#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import os
import sys
import time
import shutil
import decimal
import difflib
from time import sleep
from time import time as now
from random import randint as ran

#### Contents:
## A101 - This will create the physicall organization


sources = 	[
		"/media/NAS/Volume_2/Media Drive/Video/TV",
		"/media/NAS/Volume_2/Media Drive/Unorganized Files",
		"/media/NAS/Volume_2/Unorganized Files"
		]

destinations = 	[
		"/media/NAS/Volume_2/Organized Files",
		"/media/NAS/Volume_2/.Organized Files"
		]

keepOldSystem = True
keepOldSystem = False
linkType = "Hard"
#linkType = "Soft"
animations = True
runCont = False
runCont = True
runFreq = 5 * 60

sensitivityOther = 0.3
sensitivityTitle = 0.6

HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'

##	Titles format:
## ["Title of show",["Genre 1","Genre 2"]]

titles = [
	## Custom
	['Hannibal',["Crime","Drama","Based on a book"]],
	['Da Vinci\'s Demons',["Biopic","Historical"]],
	['Luck',["Drama"]],
	['Bullshit',["Documentary","Magic"]],
	['Doomsday Preppers',["Reality"]],
	['Boss',["Political","Drama"]],
	['30 Rock',["Comedy","Sitcom"]],
	['South Park',["Comedy","Adult","Cartoon"]],
	['Supernatural',["Fantasy","Drama","Thriller","Supernatural"]],
	['Alphas',["Supernatural","Drama"]],
	['The 4400',["Supernatural","Crappy"]],
	['Deadwood',["Western","Adult"]],
	['Star Trek: The Original Series',["SciFi","Space"]],
	['Star Trek: Deep Space Nine',["SciFi","Space"]],
	['Star Trek: Enterprise',["SciFi","Space"]],
	['Star Trek: The Next Generation',["SciFi","Space"]],
	['Star Trek: Voyager',["SciFi","Space"]],
	['Breaking Bad',["Drama","Drug","Adult"]],
	['Dexter',["Crime","Drama","Adult"]],
	['Dragon Ball',["Cartoon","Anime","Fantasy"]],
	['Dragon Ball GT',["Cartoon","Anime","Fantasy"]],
	['Dragon Ball Z',["Cartoon","Anime","Fantasy"]],
	['American Dad!',["Cartoon","Comedy","Sitcom"]],
	['Battlestar Galactica (1978)',["SciFi","Space"]],
	['Battlestar Galactica (2004)',["SciFi","Space","Adult"]],
	['Warehouse 13',["SciFi","Comedy"]],
	['Weeds',["Drama","Drug","Adult"]],
	['Fallout Nuka Break',["Webseries","Game","Gritpunk","SciFi"]],
	## Built In
	['100 Deeds for Eddie McDowd'],
	['100 Questions'],
	['100 Winners'],
	['1000 Ways to Die'],
	['10 Things I Hate About You'],
	['101 Ways to Leave a Gameshow'],
	['12 oz. Mouse'],
	['15/Love'],
	['16 and Pregnant'],
	['18 to Life'],
	['$1.98 Beauty Show'],
	['1 vs. 100'],
	['2 Broke Girls'],
	['2DTV'],
	['The 20th Century'],
	['20/20'],
	['21 Jump Street'],
	['227'],
	['24'],
	['240-Robert'],
	['The $25,000 Pyramid'],
	['3 lbs'],
	['3-South'],
	['30 Seconds to Fame'],
	['31 Minutes'],
	['3-2-1 Contact'],
	['3rd Rock from the Sun'],
	['48 Hours'],
	['4th and Long'],
	['50 Cent: The Money and the Power'],
	['50/50'],
	['60 Minutes'],
	['6teen'],
	['The $64,000 Question'],
	['64 Zoo Lane'],
	['666 Park Avenue'],
	['The 700 Club'],
	['704 Hauser'],
	['7th Heaven'],
	['77 Sunset Strip'],
	['8 Simple Rules'],
	['8:15 from Manchester'],
	['8th & Ocean'],
	['90210'],
	['Aaahh!!! Real Monsters'],
	['Aaron Stone'],
	['The Abbott and Costello Show'],
	['About Anglia'],
	['Absolutely Fabulous'],
	['Acceptable.TV'],
	['Access Hollywood'],
	['According to Jim'],
	['Ace Lightning'],
	['Ace of Cakes'],
	['Acme Hour'],
	['Action'],
	['Active Kids'],
	['Adam-12'],
	['Adam Adamant Lives'],
	['Adam\'s Rib'],
	['The Addams Family'],
	['Adventure Inc.'],
	['Adventure Time'],
	['Adventures in Paradise'],
	['Adventures in Wonderland'],
	['The Adventures of Brisco County, Jr.'],
	['The Adventures of Chico and Guapo'],
	['The Adventures of Ellery Queen'],
	['The Adventures of Jimmy Neutron: Boy Genius'],
	['The Adventures of Pete & Pete'],
	['The Adventures of Rin Tin Tin'],
	['The Adventures of Robin Hood'],
	['The Adventures of the Scarlet Pimpernel'],
	['Adventures of Sonic The Hedgehog'],
	['The Adventures of Super Mario Bros. 3'],
	['Adventures of Superman'],
	['The Adventures of Tintin'],
	['The Adventures of Twizzle (UK)'],
	['The Adventures of Wild Bill Hickok'],
	['The Adventures of William Tell'],
	['A.E.S. Hudson Street'],
	['AEon Flux'],
	['Afro Samurai'],
	['After Dark'],
	['AfterMASH'],
	['Age of Love'],
	['Airwolf'],
	['Akumaizer 3'],
	['Aladdin'],
	['Alcatraz'],
	['Allen Gregory'],
	['The Alan Young Show'],
	['Alas Smith and Jones'],
	['ALF'],
	['Alfred Hitchcock Presents'],
	['Alfred J. Kwak'],
	['AlfTales'],
	['Alias'],
	['Alias Smith and Jones'],
	['Alice'],
	['Alice, I Think'],
	['Alien Nation'],
	['Aliens in America'],
	['Aliens in the Family'],
	['All About Faces'],
	['All About Me'],
	['All American Girl (1994)'],
	['All American Girl (2003)'],
	['All Grown Up'],
	['All in the Family'],
	['All Is Forgiven'],
	['All My Children'],
	['\'Allo \'Allo!'],
	['All That'],
	['Ally McBeal'],
	['Almost Live!'],
	['Alphablocks'],
	['The Amanda Show'],
	['The Amazing Chan and the Chan Clan'],
	['Amazing Extraordinary Friends'],
	['The Amazing Race'],
	['The Amazing Race Asia'],
	['The Amazing Spider-Man (1977, live action)'],
	['Amazing Stories'],
	['The Amazing World Of Gumball'],
	['Amen'],
	['America\'s Best Dance Crew'],
	['America\'s Funniest Home Videos'],
	['America\'s Funniest People'],
	['America\'s Got Talent'],
	['America\'s Most Wanted'],
	['America\'s Next Top Model'],
	['American Bandstand'],
	['American Chopper'],
	['American Dragon: Jake Long'],
	['American Dream Derby'],
	['American Dreams'],
	['The American Embassy'],
	['American Gangster'],
	['American Gladiators'],
	['American Gothic'],
	['American High'],
	['American Horror Story'],
	['American Idol (reality)'],
	['American Pickers'],
	['The Americans (1961)'],
	['The Americans (2013)'],
	['Andromeda'],
	['The Andy Dick Show'],
	['The Andy Griffith Show'],
	['Andy Richter Controls the Universe'],
	['The Andy Williams Show'],
	['Angel'],
	['Angry Beavers'],
	['Angry Boys'],
	['An Idiot Abroad'],
	['Animal Jam'],
	['Animaniacs'],
	['The Animals of Farthing Wood'],
	['Animorphs'],
	['Anna and the King'],
	['Annie Oakley'],
	['Another World'],
	['ANT Farm'],
	['Any Dream Will Do'],
	['Anyone for Tennyson?'],
	['Anything but Love'],
	['Anything You Can Do'],
	['Appalachia: A History of Mountains and People'],
	['Apple\'s Way'],
	['The Apprentice'],
	['The Celebrity Apprentice'],
	['Aqua Teen Hunger Force'],
	['Archer'],
	['Archie Bunker\'s Place'],
	['Archie\'s Weird Mysteries'],
	['Are You Afraid of the Dark?'],
	['Are You Being Served?'],
	['Are You Smarter Than a 5th Grader?'],
	['Ark II'],
	['Armed & Famous'],
	['Arnie'],
	['Arrested Development'],
	['Arrow'],
	['Armstrong Circle Theatre'],
	['The Arsenio Hall Show'],
	['Art Attack'],
	['Arthur'],
	['Arthur Godfrey and His Friends'],
	['Arthur Godfrey\'s Talent Scouts'],
	['The Arthur Murray Party'],
	['As The World Turns'],
	['As Told By Ginger'],
	['Ashes To Ashes'],
	['The Assistants'],
	['Ask The Family'],
	['Ask This Old House'],
	['The A-Team'],
	['Atom Ant'],
	['Atomic Betty'],
	['Attack Of The Show'],
	['At the Movies with Ebert & Roeper'],
	['Austin & Ally'],
	['Austin City Limits'],
	['Australia\'s Next Top Model'],
	['Avatar: The Last Airbender'],
	['The Avengers'],
	['Average Joe'],
	['Awake'],
	['Awkward'],
	['B. J. and the Bear'],
	['Baa Baa Black Sheep'],
	['Babes'],
	['Babestation'],
	['Babylon 5'],
	['Baby Boom'],
	['Baby Daddy'],
	['Baby Talk'],
	['Bachelor Father'],
	['The Bachelor'],
	['The Bachelor: London Calling'],
	['The Bachelorette'],
	['Back at the Barnyard'],
	['Back to the Future: The Animated Series'],
	['Back to You'],
	['Backyard Blitz'],
	['The Backyardigans'],
	['Bad Girls'],
	['Bagdad Cafe'],
	['Bagpuss'],
	['Ballbreakers'],
	['Banacek'],
	['The Banana Splits'],
	['Band of Brothers'],
	['The Barbara Stanwyck Show'],
	['Barbarian Chronicles'],
	['Barefoot in the Park'],
	['Baretta'],
	['Barnaby Jones'],
	['Barney & Friends'],
	['Barney Miller'],
	['Basil Brush'],
	['Batfink'],
	['Bat Masterson'],
	['Batman'],
	['Batman and the Super 7'],
	['Batman: The Animated Series'],
	['Batman Beyond'],
	['The New Batman/Superman Adventures'],
	['The Batman'],
	['Battery Park'],
	['Battle B-Daman'],
	['Bay City Blues'],
	['Bayly (TV series)'],
	['Baywatch'],
	['Baywatch Nights'],
	['The Beachcombers'],
	['Beadle\'s About'],
	['Beakman\'s World'],
	['Beany and Cecil'],
	['Bear in the Big Blue House'],
	['Bearcats!'],
	['BeastMaster'],
	['Beat The Chef'],
	['Beat the Clock'],
	['Beating Heart'],
	['Beauty and the Beast (1987)'],
	['Beauty & the Beast (2012)'],
	['Beauty and the Geek'],
	['Beavis and Butt-head'],
	['Le Bébête Show'],
	['Becker'],
	['Bedtime Stories[disambiguation needed] (UK)'],
	['Beetleborgs'],
	['Beetlejuice'],
	['Behind the Music'],
	['Being Erica'],
	['Being Human (2009)'],
	['Being Human (2011)'],
	['Being Ian'],
	['Belle and Sebastian (TV series) (French)'],
	['Belle and Sebastian (TV series) (Japanese)'],
	['Ben 10'],
	['Ben 10: Alien Force'],
	['Ben 10: Ultimate Alien'],
	['Ben 10: Omniverse'],
	['Ben Casey'],
	['Benidorm'],
	['The Benny Hill Show'],
	['The Ben Stiller Show'],
	['Benson'],
	['Besame Tonto (Venezuela-Peru)'],
	['The Best Years'],
	['Bethenny Getting Married?'],
	['The Better Sex'],
	['Better with You'],
	['Better Off Ted'],
	['Bettina S.'],
	['The Beverly Hillbillies'],
	['Beverly Hills, 90210'],
	['Bewitched'],
	['Beyblade'],
	['Bienvenidos (Venezuela)'],
	['Big Arvo'],
	['The Big Bang Theory'],
	['Big Brother'],
	['The Big Gig'],
	['The Big House'],
	['Big Love'],
	['The Big Picture'],
	['Big Town'],
	['Big Time Rush'],
	['The Big Valley'],
	['Bill and Ben'],
	['Bill & Ted\'s Excellent Adventures (1990)'],
	['Bill & Ted\'s Excellent Adventures (1992)'],
	['Bill Nye the Science Guy'],
	['Billy (with Steve Guttenberg, 1979)'],
	['Billy (with Billy Connolly, 1992)'],
	['Bionic Woman'],
	['The Bionic Woman'],
	['Birds of Prey'],
	['A Bit of Fry & Laurie'],
	['Black and Blue (UK)'],
	['Blackadder'],
	['Black Books'],
	['Black Panther'],
	['Blackpool'],
	['The Black Donnellys'],
	['Blade'],
	['Blade: The Series'],
	['Blake\'s 7'],
	['Blandings'],
	['Bleach (manga)'],
	['Bless This House (UK)'],
	['Bless This House (US)'],
	['Blood Ties'],
	['The Block'],
	['Blockbusters'],
	['Blonde Charity Mafia'],
	['Blossom'],
	['Blow Out'],
	['Blue Bloods'],
	['Blue Heelers'],
	['Blue Mountain State'],
	['Blue Peter'],
	['Blue Thunder'],
	['Boardwalk Empire'],
	['Bob & Carol & Ted & Alice'],
	['Bob and Margaret'],
	['The Bobby Vinton Show (Canada)'],
	['Bobby\'s World'],
	['The Bob Cummings Show'],
	['Bob Hope Presents the Chrysler Theatre'],
	['The Bob Newhart Show'],
	['Bob Patterson'],
	['Bob the Builder'],
	['Bob Vila'],
	['Bob Vila\'s Home Again'],
	['Body Language'],
	['BodyShaping'],
	['BodyShock'],
	['The Bold and the Beautiful'],
	['The Bold Ones'],
	['Bonanza'],
	['Bones'],
	['Boney (Australia)'],
	['The Book Quiz'],
	['Booker'],
	['Boon'],
	['The Boondocks'],
	['Boot Camp'],
	['Bored to Death'],
	['Borgia'],
	['The Borgias (1981)'],
	['The Borgias (2011)'],
	['Born Free'],
	['Boston Common'],
	['Boston Legal'],
	['Boston Public'],
	['Bourbon Street Beat'],
	['"Bowling For Dollars"'],
	['The Box'],
	['Boy Meets World'],
	['The Bozo Show'],
	['Bracken\'s World'],
	['Brat Camp'],
	['Braceface'],
	['The Brady Brides'],
	['The Brady Bunch'],
	['The Brady Bunch Hour'],
	['The Bradys'],
	['Brady\'s Beasts'],
	['BrainSurge'],
	['Branded'],
	['Brandy and Mr. Whiskers'],
	['Brass Eye'],
	['Break the Bank (1948)'],
	['Break the Bank (1976)'],
	['Break the Bank (1985)'],
	['Breakfast News'],
	['Breaking Away'],
	['Breaking Bonaduce'],
	['Breakout Kings'],
	['The Brian Keith Show'],
	['Bridget Loves Bernie'],
	['Brimstone'],
	['Britain\'s Got Talent'],
	['Britain\'s Missing Top Model'],
	['Britain\'s Next Top Model'],
	['Britney & Kevin: Chaotic'],
	['Broken Arrow'],
	['Bromwell High'],
	['Bronco'],
	['Brooke Knows Best'],
	['Brotherly Love'],
	['The Brothers (1972) (UK)'],
	['Brothers & Sisters (1979)'],
	['Brothers & Sisters (2006)'],
	['Bubble Guppies'],
	['The Buccaneers'],
	['Buck Rogers'],
	['Buck Rogers in the 25th Century'],
	['Bucket & Skinner\'s Epic Adventures'],
	['The Bugaloos'],
	['The Bugs Bunny Show'],
	['Buffy the Vampire Slayer'],
	['Bug Juice'],
	['Bullseye'],
	['Bumper Stumpers'],
	['Bumpety Boo'],
	['Bunheads'],
	['Burke\'s Law'],
	['Burn Notice'],
	['Bustin\' Loose'],
	['Busting Loose'],
	['The Buzz on Maggie'],
	['Byker Grove'],
	['C. Everett Koop, M.D.'],
	['C.A.B.'],
	['Cade\'s County'],
	['Caesar\'s Hour'],
	['Cagney & Lacey'],
	['Caillou'],
	['Caitlin\'s Way'],
	['Cake'],
	['Cake Boss'],
	['California Dreams'],
	['Californication'],
	['Call Red'],
	['Calucci\'s Department'],
	['Camelot'],
	['Camouflage'],
	['Camp Candy'],
	['Camp Lazlo'],
	['Camp Runamuck'],
	['Canadian Idol'],
	['Candid Camera'],
	['The Candy Apple News Company'],
	['Cannon'],
	['Candle Cove'],
	['Cannonball'],
	['Canterbury\'s Law'],
	['The Cape (1996-1997)'],
	['The Cape (2011)'],
	['Caprica'],
	['Captain Caveman and the Teen Angels'],
	['Captain Kangaroo'],
	['Captain N: The Game Master'],
	['Captain Nice'],
	['Captain Planet and the Planeteers'],
	['Captain Power'],
	['Captain Scarlet and the Mysterons'],
	['Captain Video and His Video Rangers'],
	['Car 54, Where Are You?'],
	['Cara Sucia (Venezuela)'],
	['Card Captors'],
	['Card Sharks'],
	['Care Bears'],
	['Caribe'],
	['Carl Squared'],
	['Carnivàle'],
	['The Carol Burnett Show'],
	['Caroline in the City'],
	['Cash Cab'],
	['Castle'],
	['Catalyst'],
	['CatDog'],
	['The Catherine Tate Show'],
	['Catscratch'],
	['Catwalk (Australia)'],
	['Cavemen'],
	['Celebrity Blackjack'],
	['Celebrity Charades'],
	['Celebrity Deathmatch'],
	['Celebrity Rehab Presents Sober House'],
	['Celebrity Rehab with Dr. Drew'],
	['Centennial'],
	['Chain Reaction'],
	['Chalk'],
	['ChalkZone'],
	['Charlie Chalk'],
	['Champion the Wonder Horse'],
	['The Changes (UK)'],
	['Chappelle\'s Show'],
	['Charlie Jade'],
	['Charlie Rose'],
	['Charlie\'s Angels (1976)'],
	['Charlie\'s Angels (2011)'],
	['Charlie Brown'],
	['Charmed'],
	['The Charmings'],
	['Charm School'],
	['Chase (1973)'],
	['Chase (2010)'],
	['Cha$e'],
	['Cheers'],
	['Cheez TV'],
	['Chef School'],
	['Cheyenne'],
	['Chicago Hope'],
	['Chicago Fire'],
	['Chicagolicious'],
	['Chico and the Man'],
	['Childrens Hospital'],
	['Child\'s Play'],
	['The Chimp Channel'],
	['China Beach'],
	['CHiPs'],
	['Chip \'n Dale Rescue Rangers'],
	['Chocolate News'],
	['Choose Up Sides'],
	['Chopper One'],
	['Chowder'],
	['Chuck'],
	['CI5: The New Professionals'],
	['Ciao Darwin (Italy)'],
	['Ciel mon mardi (France)'],
	['Cimarron Strip'],
	['Circus Boy'],
	['The Cisco Kid'],
	['The City (1995)'],
	['The City (1999)'],
	['The City (2008)'],
	['City Lights'],
	['Civil Wars'],
	['Clangers'],
	['Clarissa Explains It All'],
	['A Class by Himself'],
	['Class of 3000'],
	['Class of \'74'],
	['Cleopatra 2525'],
	['The Cleveland Show'],
	['Clerks: The Animated Series'],
	['Click'],
	['Climax!'],
	['The Closer'],
	['Club Mario'],
	['Clueless'],
	['Clutch Cargo'],
	['Coach'],
	['CODCO'],
	['Code Geass'],
	['Code Lyoko'],
	['Code Monkeys'],
	['Code Red'],
	['Codename: Kids Next Door'],
	['Co-Ed Fever'],
	['The Colbert Report'],
	['The Colbys'],
	['Cold Case'],
	['Cold Feet'],
	['Colditz'],
	['The Colgate Comedy Hour'],
	['The Collector'],
	['The Colony'],
	['Columbo'],
	['Combat!'],
	['Come Dine With Me'],
	['Come Dine With Me Australia'],
	['Commander in Chief'],
	['The Commish'],
	['Committed'],
	['Community'],
	['The Contender'],
	['Contraption'],
	['Cops'],
	['C.O.P.S.'],
	['Copter Patrol'],
	['Corner Gas'],
	['Coronation Street'],
	['Coronet Blue'],
	['Cory in the House'],
	['The Cosby Mysteries'],
	['The Cosby Show'],
	['Cosmetic Surgery Live'],
	['Cotorreando'],
	['Cougar Town'],
	['Countdown (UK)'],
	['Countdown (Australia)'],
	['Count Duckula'],
	['Country Music Jubilee'],
	['A Country Practice'],
	['Country Style'],
	['Countrytime (1960)'],
	['Countrytime (1970) (Canada)'],
	['Courage the Cowardly Dog'],
	['Cousin Skeeter'],
	['The Courtship of Eddie\'s Father'],
	['Cover Up'],
	['Covert Affairs'],
	['Cow and Chicken'],
	['Cowboy Bebop'],
	['The Cowboys'],
	['C.P.O. Sharkey'],
	['Cracker (UK)'],
	['Cracker (US)'],
	['Cracking Up'],
	['Craft Corner Deathmatch'],
	['Cram'],
	['Crayon Shin-chan'],
	['Crazy Like A Fox'],
	['The Crew'],
	['Crime Story'],
	['Criminal Minds'],
	['Criss Angel Mindfreak'],
	['The Critical Hour'],
	['The Crocodile Hunter'],
	['Crossbow'],
	['Crossfire (UK)'],
	['Crossfire (US)'],
	['Crossing Jordan'],
	['Crowned'],
	['Crusade'],
	['Crusade in Europe'],
	['Crusader Rabbit'],
	['Crusoe'],
	['CSI: Crime Scene Investigation'],
	['CSI: Miami'],
	['CSI: NY'],
	['Cupcake Wars'],
	['Curb Your Enthusiasm'],
	['Cyberchase'],
	['Cybersix'],
	['Cybill'],
	['The D.A.(1971)'],
	['The D.A. (1981)'],
	['Da Ali G Show'],
	['Dad\'s Army'],
	['Daily Planet'],
	['The Daily Show'],
	['Daisy of Love'],
	['Daitetsujin 17'],
	['Daktari'],
	['Dallas'],
	['Damages'],
	['August Dan August'],
	['Dance Academy'],
	['Dance Moms'],
	['Danger 5'],
	['Danger Island'],
	['Danger Man'],
	['Dani\'s House'],
	['Danny Phantom'],
	['Dark Angel'],
	['Dark Blue'],
	['Darker than Black'],
	['Dark Shadows'],
	['Dark Shadows (1991)'],
	['Darkwing Duck'],
	['Dawson\'s Creek'],
	['Day Break'],
	['Days of our Lives'],
	['Dead of NIght (UK)'],
	['Deadliest Warrior'],
	['Dead Like Me'],
	['The Dead Zone'],
	['Deal or No Deal'],
	['Death in Paradise'],
	['Decisiones'],
	['Defying Gravity'],
	['Degrassi High'],
	['Degrassi Junior High'],
	['Degrassi: The Next Generation'],
	['Deltora Quest'],
	['Demons'],
	['Department S'],
	['Desert Punk'],
	['Desperate Housewives'],
	['Destroy Build Destroy'],
	['Dexter\'s Laboratory'],
	['Dharma and Greg'],
	['Diana'],
	['Diff\'rent Strokes'],
	['Digimon'],
	['Dilbert'],
	['Diners, Drive-Ins and Dives'],
	['Dinner Impossible'],
	['Dinosaucers'],
	['Dirt'],
	['Dirty Jobs'],
	['Dirty Sally'],
	['Dirty Sexy Money'],
	['Disney\'s Adventures of the Gummi Bears'],
	['Dixon of Dock Green'],
	['Do Over'],
	['Doc Elliot'],
	['Doctors (soap opera)'],
	['Doctor Who'],
	['Dodger, Bonzo and the Rest'],
	['Dog Bites Man'],
	['Dollhouse'],
	['Donkey Kong Country'],
	['The Donna Dewberry Show'],
	['The Donna Reed Show'],
	['Donnie & Marie'],
	['Don\'t Forget Your Toothbrush'],
	['Don\'t Trust the B---- in Apartment 23'],
	['Doogie Howser, M.D.'],
	['Doomwatch'],
	['Double Trouble (U.S.)'],
	['Doug'],
	['The Downer Channel'],
	['Downton Abbey'],
	['Drake & Josh'],
	['Drawn Together'],
	['The Dresden Files'],
	['The Drew Carey Show'],
	['Drive'],
	['Droids (cartoon)'],
	['"Dr. Kildare"'],
	['Dr. Phil Show'],
	['The Dr. Oz Show'],
	['Dr. Phil Show'],
	['Dr. Quinn, Medicine Woman'],
	['Drop Dead Diva'],
	['Duck Dynasty'],
	['The Duck Factory'],
	['DuckTales'],
	['Dude, What Would Happen?'],
	['Dudley Do-Right'],
	['Dungeons & Dragons (TV series)'],
	['Due South'],
	['The Dukes of Hazzard'],
	['Dusty\'s Trail'],
	['Dynomutt, Dog Wonder'],
	['E Street'],
	['E! True Hollywood Story'],
	['E-Ring'],
	['ECW on Syfy'],
	['ECW on TNN'],
	['Early Doors'],
	['Early Edition'],
	['The Early Show'],
	['Earth 2'],
	['Earth Final Conflict'],
	['Earth Revealed: Introductory Geology'],
	['Earthworm Jim'],
	['Eastbound & Down'],
	['EastEnders'],
	['East Midlands Today'],
	['Eastwick'],
	['Ed'],
	['Ed, Edd, and Eddy'],
	['The Ed Sullivan Show'],
	['The Eddy Arnold Show'],
	['Eddy Arnold Time'],
	['Eden of the East'],
	['The Edge of Space'],
	['Eek! the Cat'],
	['Eerie, Indiana'],
	['Eight Days a Week'],
	['Eight is Enough'],
	['Electra Woman and Dyna Girl (1976)'],
	['Electra Woman and Dyna Girl (2001)'],
	['The Electric Company'],
	['Elementary'],
	['Eli Stone'],
	['Elizabeth R'],
	['Ellen'],
	['The Ellen DeGeneres Show'],
	['The Ellen Show'],
	['El Tigre: The Adventures of Manny Rivera'],
	['Eleventh Hour (UK)'],
	['Eleventh Hour (US)'],
	['Ellery Queen'],
	['Emergency!'],
	['Emergency Vets'],
	['Emily\'s Reasons Why Not'],
	['Emmerdale'],
	['The Emperor\'s New School'],
	['Empire (1962)'],
	['Empire (2005)'],
	['Empty Nest'],
	['E.N.G.'],
	['Encantadia'],
	['Endgame'],
	['Engine Sentai Go-Onger'],
	['Entertainment Tonight'],
	['Entourage'],
	['Episodes'],
	['The Equalizer'],
	['E/R (sitcom)'],
	['ER'],
	['Escrava Isaura (Brazil)'],
	['Eternal Law'],
	['Eureka'],
	['Eureeka\'s Castle'],
	['Even Stevens'],
	['Evening Shade'],
	['The Event'],
	['The Everglades'],
	['Everwood'],
	['Everybody Hates Chris'],
	['Everybody Loves Raymond'],
	['Exit 57'],
	['Exosquad'],
	['Extra Challenge'],
	['Extras'],
	['Extreme Dodgeball'],
	['Extreme Evidence'],
	['Extreme Makeover'],
	['Extreme Makeover: Home Edition'],
	['Eye Guess'],
	['Eyewitness'],
	['EZ Streets'],
	['The F.B.I.'],
	['F Troop'],
	['The Face Is Familiar'],
	['The Facts of Life'],
	['Faerie Tale Theatre'],
	['Fair City'],
	['The Fairly OddParents'],
	['Falcón'],
	['Falcon Crest'],
	['The Fall Guy'],
	['Falling Skies'],
	['Faking It'],
	['Fame'],
	['Family'],
	['Family Affair'],
	['Family Affairs'],
	['Family Biz'],
	['Family Challenge'],
	['Family Feud'],
	['A Family for Joe'],
	['Family Fortunes'],
	['The Family Genius'],
	['Family Guy'],
	['Family Matters'],
	['The Family-Ness'],
	['Family Ties'],
	['The Famous Five[disambiguation needed]'],
	['Fanboy and Chum Chum'],
	['Fantastic Four (1967 TV series)'],
	['The Fantastic Journey'],
	['Fantastic Max'],
	['Fantasy Island'],
	['Farmer Wants a Wife'],
	['Farscape'],
	['Fashion House'],
	['Fast Forward'],
	['Fast Money'],
	['The Fast Show'],
	['Fastlane'],
	['Fat Albert and the Cosby Kids'],
	['Fat Guy Stuck in Internet'],
	['Father Brown (TV series)'],
	['Father Brown (2013 TV series)'],
	['Father Dowling Mysteries'],
	['Father Knows Best'],
	['Father Murphy'],
	['Father of the Pride'],
	['Father Ted'],
	['Fat March'],
	['Fawlty Towers'],
	['Fay'],
	['Fear Itself'],
	['Felicity'],
	['Felix the Cat'],
	['Felony Squad'],
	['Fernwood 2-Night'],
	['Ferris Bueller'],
	['Fight Back! With David Horowitz'],
	['Filthy Rich & Catflap'],
	['Firefly'],
	['Firehouse'],
	['Fish Hooks'],
	['Fishing With John'],
	['Five Fingers'],
	['Five Star Jubilee'],
	['Flambards'],
	['Flamingo Road'],
	['FlashForward'],
	['Flash Forward'],
	['Flashpoint'],
	['Flavor Of Love'],
	['The Flintstones'],
	['Flight 29 Down'],
	['Flight of the Conchords'],
	['Flikken'],
	['The Flip Wilson Show'],
	['Flipper (1964)'],
	['Flipper (1995)'],
	['Flipping Out'],
	['Flower Pot Men'],
	['The Flying Nun'],
	['Fly Tales'],
	['Flying Rhino Junior High'],
	['Foley Square'],
	['Food Network Challenge'],
	['Food Party'],
	['Football Superstar'],
	['For Better or for Worse'],
	['Forbidden Science'],
	['Force Five'],
	['Ford Theatre'],
	['Forever Knight'],
	['Forgive or Forget'],
	['The Forgotten'],
	['Foster\'s Home for Imaginary Friends'],
	['Four Feather Falls (UK)'],
	['The Four Just Men'],
	['Four Star Playhouse'],
	['Fraggle Rock'],
	['Franklin'],
	['Frasier'],
	['Freakazoid'],
	['Freaks & Geeks'],
	['FreakyLinks'],
	['The Fred Waring Show'],
	['Freewheelers'],
	['The Fresh Prince of Bel-Air'],
	['Friday Night Lights'],
	['Fridays'],
	['Friend or Foe?'],
	['Friends'],
	['Friends and Lovers; see Paul Sand in Friends and Lovers'],
	['Friendzone'],
	['Fringe'],
	['Frisky Dingo'],
	['Forever Eden'],
	['Foster\'s Home for Imaginary Friends'],
	['Frontier'],
	['Frontier Circus'],
	['Frontier Doctor'],
	['Frontier Justice'],
	['Frontiers'],
	['Frontline'],
	['The Fugitive'],
	['Full House'],
	['Fury'],
	['Futurama'],
	['Future Weapons'],
	['G-Saviour'],
	['Gabriel\'s Fire'],
	['Gadget Boy & Heather'],
	['Galactica 1980'],
	['Galactik Football'],
	['The Gale Storm Show'],
	['The Game (Australia)'],
	['The Game (US)'],
	['The Games (Australia)'],
	['The Games (UK)'],
	['Game of Thrones',["Fantasy","Drama"]],
	['Gamer.tv'],
	['Gamezville'],
	['Gardeners\' World'],
	['Garfield and Friends'],
	['Gargoyles'],
	['Garrow\'s Law'],
	['The Garry Moore Show'],
	['Garth Marenghi\'s Darkplace'],
	['The Gates'],
	['The Gavin Crawford Show'],
	['Gavin & Stacy'],
	['Gawayn'],
	['G.E. College Bowl'],
	['The Gene Autry Show'],
	['General Electric Theater'],
	['General Hospital'],
	['General Hospital: Night Shift'],
	['The Generations Project'],
	['Gentle Ben'],
	['The George Burns and Gracie Allen Show'],
	['George Lopez'],
	['George of the Jungle'],
	['George Shrinks'],
	['Get a Life'],
	['Get Real (UK)'],
	['Get Real (U.S.)'],
	['Get Smart (1965)'],
	['Get Smart (1995)'],
	['Get the Message'],
	['The Ghost & Mrs. Muir'],
	['Ghost in the Shell: Stand Alone Complex'],
	['Ghost Story'],
	['Ghost Trackers'],
	['Ghost Whisperer'],
	['Ghostwriter'],
	['G.I. Joe: A Real American Hero (1985)'],
	['G.I. Joe: A Real American Hero (1989)'],
	['Gideon\'s Crossing'],
	['Gideon\'s Way'],
	['Gidget'],
	['Gigantor'],
	['Gilligan\'s Island'],
	['Gilmore Girls'],
	['Gimme a Break'],
	['The Girl from U.N.C.L.E.'],
	['Girl Stuff, Boy Stuff'],
	['The Girl With Something Extra'],
	['Girlfriends'],
	['Girls'],
	['Girls Behaving Badly'],
	['Girls Club'],
	['The Girls Next Door'],
	['The Glades'],
	['Glee'],
	['The Glee Project'],
	['The Glen Campbell Goodtime Hour'],
	['Glenn Beck'],
	['Glenn Martin DDS'],
	['Go'],
	['GoGo Sentai Boukenger'],
	['Go On'],
	['Gogs'],
	['Goin\' Bulilit'],
	['Going Live!'],
	['Going Places (US)'],
	['Goge Africa (Nigeria)'],
	['Going Places (Australian)'],
	['The Goldbergs'],
	['The Golden Girls'],
	['The Golden Palace'],
	['Gomer Pyle, U.S.M.C.'],
	['The Gong Show'],
	['Good Day L.A.'],
	['Good Grief'],
	['The Good Guys'],
	['The Good Life (1971)'],
	['The Good Life (1994)'],
	['Good Luck Charlie'],
	['Good Morning America'],
	['Good Morning, Miami'],
	['Good Morning, Mickey!'],
	['Good Morning, Miss Bliss'],
	['Goodness Gracious Me'],
	['Good Times'],
	['Goof Troop'],
	['The Good Wife'],
	['Gossip Girl'],
	['The Governor and J.J.'],
	['Grace Under Fire'],
	['Grandstand'],
	['Gravity Falls'],
	['The Great Space Coaster'],
	['The Greatest American Hero'],
	['Greed'],
	['Greek'],
	['Green Acres'],
	['Greg the Bunny'],
	['Grey\'s Anatomy'],
	['Griff'],
	['Grim & Evil'],
	['Grim Adventures of Billy and Mandy'],
	['Grimm'],
	['Grounded for Life'],
	['Growing Pains'],
	['Guiding Light'],
	['Les Guignols de l\'info (France)'],
	['Gumby'],
	['Gundam Seed'],
	['Gundam Seed Destiny'],
	['Gundam Wing'],
	['Gundam X'],
	['Gunslinger Girl'],
	['Gunsmoke'],
	['Gurren Lagann'],
	['H2O: Just Add Water'],
	['Half & Half'],
	['Handy Manny'],
	['Hannah Montana'],
	['Happy Days'],
	['Happy Endings'],
	['Happy Tree Friends'],
	['Hardcastle and McCormick'],
	['The Hard Times of RJ Berger'],
	['The Hardy Boys/Nancy Drew Mysteries'],
	['Harper\'s Island'],
	['Harry O'],
	['Hart to Hart'],
	['Harvey Birdman, Attorney at Law'],
	['The Haunted'],
	['Have Gun - Will Travel (western)'],
	['Haven'],
	['Hawaii Five-O (1968)'],
	['Hawaii Five-0 (2010)'],
	['Hawkins'],
	['Hawthorne'],
	['Hazel'],
	['The Head'],
	['The Heartland Series'],
	['Heist'],
	['Hee-Haw'],
	['The Helen Reddy Show'],
	['Hell on Wheels'],
	['Hell\'s Kitchen (UK)'],
	['Hell\'s Kitchen (U.S. TV series)'],
	['Hellcats'],
	['He-Man and the Masters of the Universe'],
	['Here Comes Honey Boo Boo'],
	['Here We Go Again'],
	['Here\'s Humphrey'],
	['Hergé\'s Adventures of Tintin'],
	['Hero High'],
	['Heroes'],
	['Heston\'s Feasts'],
	['Hex'],
	['Hey Arnold'],
	['Hey Dude'],
	['Hey Monie!'],
	['Hey Vern, It\'s Ernest!'],
	['Hi-de-Hi!'],
	['Highlander'],
	['Highway Patrol'],
	['Hi Hi Puffy AmiYumi'],
	['The Hills'],
	['Hitchhikers Guide To The Galaxy'],
	['Hogan\'s Heroes'],
	['Holly & Stephen\'s Saturday Showdown'],
	['Hollywood Heights\''],
	['Holmes & Yo-Yo'],
	['Home Improvement'],
	['Homeland'],
	['Hometime (US)'],
	['Hoota And Snoz'],
	['Hope & Faith'],
	['Hope and Gloria'],
	['Hope for Wildlife'],
	['Horizons'],
	['Hot L Baltimore'],
	['Hotel'],
	['Hot Potato'],
	['Hot in Cleveland'],
	['House'],
	['House Calls'],
	['House of Anubis'],
	['House of Cards'],
	['House of Lies'],
	['House of Mouse'],
	['How I Met Your Mother'],
	['How It\'s Made'],
	['How Do They Do It?'],
	['How To Be Indie'],
	['How To Rock'],
	['The Howard Stern Show'],
	['Howie Do It'],
	['Howdy Doody'],
	['Hoze Houndz'],
	['Huckleberry Hound'],
	['Huff'],
	['The Hughleys'],
	['Hung'],
	['Hullabaloo'],
	['Human Target (1992)'],
	['Human Target (2010)'],
	['Hunter (Australian, late 1980s)'],
	['Hunter (Australian, 1967–1969)'],
	['Hunter (UK)'],
	['Hunter (US)'],
	['The Huntress'],
	['The Huntley-Brinkley Report'],
	['Hustle'],
	['Hyperdrive'],
	['iCarly'],
	['I\'d Do Anything'],
	['I Dream of Jeannie'],
	['I Love Lucy (1951–1957)'],
	['I Love Money'],
	['I Love New York'],
	['I Shouldn\'t Be Alive'],
	['I\'m Alan Partridge'],
	['I\'m a Celebrity... Get Me out of Here!'],
	['I\'m In The Band'],
	['I\'m Telling!'],
	['I\'m with Her'],
	['The Immortal'],
	['The Incredible Hulk'],
	['In Living Color'],
	['Inspector Gadget'],
	['In the Heat of the Night'],
	['In the Night Garden'],
	['The Inbetweeners (UK)'],
	['The Inbetweeners (US)'],
	['Inquizition'],
	['The Inside'],
	['The Insider'],
	['Inspector Gadget'],
	['The Interns'],
	['In Treatment'],
	['Interpol Calling'],
	['Intervention'],
	['InuYasha'],
	['Invader Zim'],
	['The Invaders'],
	['Inquizition'],
	['I Pity the Fool'],
	['The Islanders'],
	['Iron Chef America'],
	['Iron Man'],
	['Ironside'],
	['The IT Crowd'],
	['It Takes a Thief (1968)'],
	['It Takes a Thief (2005)'],
	['It\'s a Knockout'],
	['It\'s About Time'],
	['It\'s All in the Game'],
	['It\'s Always Sunny in Philadelphia'],
	['It\'s a Living'],
	['It\'s a Miracle'],
	['It\'s a Square World'],
	['It\'s Garry Shandling\'s Show'],
	['It\'s Your Call with Lynn Doyle'],
	['I\'ve Got a Secret'],
	['Ivanhoe (1958)'],
	['Ivanhoe (1970)'],
	['I Wanna Be a Soap Star'],
	['Jake and the Never Land Pirates'],
	['Jack & Bobby'],
	['The Jack Benny Program'],
	['The Jack Paar Program'],
	['Jack the Ripper (UK)'],
	['Jackass'],
	['The Jackie Gleason Show'],
	['Jackie Chan Adventures'],
	['Jackpot'],
	['Jacob Two-Two'],
	['JAG'],
	['Jail'],
	['Jake 2.0'],
	['Jake and the Fatman'],
	['James at 15 (a.k.a. James at 16)'],
	['The Jamie Foxx Show'],
	['Jane and the Dragon'],
	['Jane By Design'],
	['Jason King (UK)'],
	['Jason of Star Command'],
	['The Jay Leno Show'],
	['The Jeffersons'],
	['Jem (TV series)'],
	['Jeopardy!'],
	['Jep!'],
	['Jeremiah'],
	['Jericho'],
	['Jerry Lewis MDA Telethon'],
	['The Jerry Springer Show'],
	['The Jersey'],
	['Jersey Shore'],
	['Jerseylicious'],
	['Jesse'],
	['Jessie'],
	['The Jetsons'],
	['The Jim Nabors Hour'],
	['The Jimmie Rodgers Show'],
	['The Jimmy Dean Show'],
	['Jimmy Kimmel Live!'],
	['Jimmy Two-Shoes'],
	['Joan of Arcadia'],
	['Joe Millionaire'],
	['Joe 90 (UK)'],
	['Joey'],
	['The Joe Schmo Show'],
	['JONAS'],
	['John Adams'],
	['John McLaughlin\'s One On One'],
	['Johnny and the Sprites'],
	['Johnny Bravo'],
	['The Johnny Cash Show'],
	['Johnny Staccato'],
	['Johnny Test'],
	['The Joker\'s Wild'],
	['Joking Apart'],
	['Jon & Kate Plus 8'],
	['Jonny Quest'],
	['Josie and the Pussycats'],
	['Journeyman'],
	['The Joy of Painting'],
	['Jubilee USA'],
	['Judd, for the Defense'],
	['Judge Joe Brown'],
	['Judge John Deed'],
	['Judge Judy'],
	['Judge Mathis'],
	['Judging Amy'],
	['Juke Box Jury'],
	['Julia'],
	['Julie'],
	['Jungle Junction'],
	['Junior Television Club'],
	['Junkyard Wars'],
	['The Jury'],
	['Just Jordan'],
	['Just for Laughs'],
	['Just for Laughs Gags'],
	['Justice (1954)'],
	['Justice (1971)'],
	['Justice (2006)'],
	['Justice League'],
	['Justice League Unlimited'],
	['Just Shoot Me!'],
	['Just the Ten of Us'],
	['Just William (1976) (UK)'],
	['Just William (1994) (UK)'],
	['Justified'],
	['Juken Sentai Gekiranger'],
	['Kablam!'],
	['Kaiketsu Zubat'],
	['Kappa Mikey'],
	['Karen'],
	['Kate & Allie'],
	['Kath & Kim (Australian)'],
	['Kath & Kim (US)'],
	['Kathy'],
	['Kathy Griffin: My Life on the D-List'],
	['Keeping Up Appearances'],
	['Kenan & Kel'],
	['Kenny vs. Spenny'],
	['Kept'],
	['Keeping Up with the Kardashians'],
	['Kevin Hill'],
	['Khloé & Lamar'],
	['Kick Buttowski: Suburban Daredevil'],
	['Kickin\' It'],
	['Kidd Video'],
	['Kid Nation'],
	['The Kids from Room 402'],
	['Kids Incorporated'],
	['The Kids in the Hall'],
	['The Kids of Degrassi Street'],
	['Kid vs. Kat'],
	['Killer Instinct'],
	['The Killing'],
	['Kim Possible'],
	['Kimba the White Lion'],
	['King'],
	['The King Family Show'],
	['King of Kensington'],
	['The King of Queens'],
	['King of the Hill'],
	['Kingdom Hospital'],
	['Kingpin'],
	['Kingston: Confidential'],
	['Kitchen Confidential'],
	['Knightmare'],
	['Knight Rider (1982–1986)'],
	['Knight Rider (2008–2009)'],
	['The Knights of Prosperity'],
	['Knots Landing'],
	['Knowing Me, Knowing You'],
	['Kodiak'],
	['Kojak'],
	['Kolchak: The Night Stalker'],
	['Kourtney and Khloé Take Miami'],
	['Kourtney and Kim Take New York'],
	['Kraft Television Theatre'],
	['Krypto the Superdog'],
	['The Krypton Factor'],
	['Kukla, Fran and Ollie'],
	['Kung Fu'],
	['Kung Fu Panda'],
	['Kyle XY'],
	['Kyōryū Sentai Zyuranger'],
	['The L Word'],
	['L.A. Law'],
	['La Femme Nikita'],
	['Lab Rats'],
	['Laguna Beach: The Real Orange County'],
	['Lamb Chop\'s Play-Along'],
	['Lancer'],
	['Land of the Giants'],
	['Land of the Lost (1974)'],
	['Land of the Lost (1991)'],
	['Laramie'],
	['Laredo'],
	['Larry King Live'],
	['Lassie'],
	['Last Call'],
	['Last Man Standing (U.S. 2001)'],
	['Las Vegas'],
	['The Late Late Show'],
	['Late Night with Conan O\'Brien'],
	['Late Night with David Letterman'],
	['Late Night with Jimmy Fallon'],
	['Late Show with David Letterman'],
	['Later with Bob Costas'],
	['Later with Greg Kinnear'],
	['Laverne & Shirley'],
	['Law & Order'],
	['Law & Order: Criminal Intent'],
	['Law & Order: Special Victims Unit'],
	['Law & Order: Trial by Jury'],
	['Lawman'],
	['The Lawrence Welk Show'],
	['Lazer Tag Academy'],
	['LazyTown'],
	['The League of Gentlemen'],
	['Leave It to Beaver'],
	['The Legend of Korra'],
	['Legend of the Seeker'],
	['The Legend of Zelda'],
	['Legends of the Hidden Temple'],
	['Less than Perfect'],
	['Let\'s Make a Deal'],
	['Let The Blood Run Free'],
	['The Letter People'],
	['Leverage'],
	['Lexx'],
	['Liberty Street'],
	['Lidsville'],
	['Lie to Me'],
	['Life'],
	['Life After People'],
	['The Life and Legend of Wyatt Earp'],
	['Life Begins at Eighty'],
	['Life Goes On'],
	['Life Is Wild'],
	['Life is Worth Living'],
	['The Life of Riley'],
	['Life on Mars (UK)'],
	['Life on Mars (US)'],
	['Lifestyles of the Rich and Famous'],
	['Life with Boys'],
	['Life with Derek'],
	['Life with Lucy'],
	['Life\'s Too Short'],
	['Lightning Point (aka Alien Surf Girls)'],
	['Lilo & Stitch'],
	['Lilyhammer'],
	['Lindenstraße (Germany)'],
	['The Lineup'],
	['Lingo'],
	['Listen Up!'],
	['Little Britain'],
	['Little Britain USA'],
	['Little Einsteins'],
	['Little House on the Prairie'],
	['Little Lulu'],
	['Little mosque on the prairie'],
	['Little Muppet Monsters'],
	['The Little People'],
	['Little People, Big World'],
	['Little Rascals'],
	['Little Robots'],
	['Live with Regis and Kathie Lee'],
	['Live with Regis and Kelly'],
	['Live It Up!'],
	['The Living Century'],
	['Living It Up! With Ali & Jack'],
	['Living Single'],
	['Lizzie McGuire'],
	['Lobo'],
	['Location, Location, Location (UK)'],
	['Lockie Leonard'],
	['Loft Story (France)'],
	['Logan\'s Run'],
	['Lois & Clark: The New Adventures of Superman'],
	['The Lone Gunmen'],
	['The Lone Ranger (western)'],
	['The Loner'],
	['Longmire'],
	['Longstreet'],
	['Look Around You'],
	['Looney Tunes'],
	['The Loop'],
	['The Loretta Young Show'],
	['Lost'],
	['Lost in Space'],
	['The Lost Room'],
	['Lotsa Luck'],
	['Lou Grant'],
	['Louie'],
	['Love, American Style'],
	['The Love Boat'],
	['Love Connection'],
	['Love of Life'],
	['Love on a Rooftop'],
	['Love, Sidney'],
	['Love Thy Neighbor'],
	['Love & War'],
	['Loving'],
	['Lucas Tanner'],
	['The Lucy–Desi Comedy Hour'],
	['Lucky Louie'],
	['The Lucy Show'],
	['Luis'],
	['Lunch with Soupy Sales'],
	['Lupin the 3rd (Japan)'],
	['Luther'],
	['Lux Video Theatre'],
	['The Lying Game'],
	['MacGyver'],
	['MAD'],
	['Mad About You'],
	['Made'],
	['Mad Men'],
	['MADtv'],
	['Maggie (UK)'],
	['Maggie (US)'],
	['The Magic Hour'],
	['The Magician'],
	['The Magnificent Seven'],
	['Magnum, P.I.'],
	['Mahou Sentai Magiranger'],
	['Maji de Watashi ni Koishinasai!'],
	['Major Dad'],
	['Majority Rules!'],
	['Make Room for Daddy'],
	['Make It or Break It'],
	['Makin\' It'],
	['Making Fiends'],
	['Making the Band'],
	['Malcolm in the Middle'],
	['Malu Mulher (Brazil)'],
	['Mama\'s Family'],
	['Man About the House'],
	['The Man and the City'],
	['Man from Atlantis'],
	['The Man from U.N.C.L.E.'],
	['Man in a Suitcase'],
	['The Man Show'],
	['Man v. Food'],
	['Man vs. Wild'],
	['Manhunt (1959)'],
	['Manhunt (1969)'],
	['Manhunt (2001)'],
	['Manhunt (2004)'],
	['Maniac Mansion'],
	['Manimal'],
	['Mannix'],
	['MANswers'],
	['The Many Loves of Dobie Gillis'],
	['Marcus Welby, M.D.'],
	['Mark Twain'],
	['Married... with Children'],
	['Married by America'],
	['Married to Rock'],
	['Marshall Law'],
	['The Martha Stewart Show'],
	['Martha Speaks'],
	['Martial Law'],
	['Martin'],
	['Martin Kane, Private Eye'],
	['Martin Mystery'],
	['The Marvelous Misadventures of Flapjack'],
	['Mary (1978)'],
	['Mary (1985-1986)'],
	['Mary Hartman, Mary Hartman'],
	['Mary Kay and Johnny'],
	['The Mary Tyler Moore Hour'],
	['The Mary Tyler Moore Show'],
	['Masquerade'],
	['Masquerade Party'],
	['M*A*S*H 4077th'],
	['M.A.S.K. (Mobile Armored Strike Kommand)'],
	['MasterChef Australia'],
	['Masterpiece Theatre'],
	['Masters of Horror'],
	['Match Game'],
	['Match of the Day'],
	['Matlock'],
	['Matt Houston'],
	['Maude'],
	['Maury'],
	['Maverick'],
	['Max Headroom'],
	['The Maxx'],
	['Mayberry R.F.D.'],
	['McCloud'],
	['McHale\'s Navy'],
	['The McLaughlin Group'],
	['McMillan & Wife'],
	['Me and My Monsters'],
	['Medical Center'],
	['Medium'],
	['Meerkat Manor'],
	['Meet Millie'],
	['Meet the Press'],
	['Meet the Browns'],
	['MegaMan NT Warrior'],
	['Mega Babies'],
	['Melissa & Joey'],
	['Melody Rules'],
	['Melrose Place (1992)'],
	['Melrose Place (2009)'],
	['Men Behaving Badly'],
	['Men in Trees'],
	['Men, Women & Dogs'],
	['The Mentalist'],
	['Merlin'],
	['The Merv Griffin Show'],
	['Metal Mickey'],
	['Metalocalypse'],
	['Method & Red'],
	['Miami Vice'],
	['Mickey Mouse Club'],
	['Mickey Spillane\'s Mike Hammer'],
	['The Middle'],
	['The Middleman'],
	['Midnight Caller'],
	['The Midnight Special'],
	['The Mighty B!'],
	['The Mighty Boosh'],
	['Mighty Max'],
	['Mighty Morphin Power Rangers'],
	['Mighty Morphin Alien Rangers'],
	['Mike, Lu, and Og'],
	['Millennium'],
	['The Millionaire'],
	['The Milton Berle Show'],
	['Minga y Petraca (Puerto Rico)'],
	['Ministry Of Mayhem'],
	['Minute to Win It'],
	['Miranda'],
	['Misfits'],
	['Misfits of Science'],
	['Miss Match'],
	['Mission: Impossible'],
	['Mister Ed'],
	['Mister Maker'],
	['Mister Rogers\' Neighborhood'],
	['Mister Terrific'],
	['Mobile Suit Gundam'],
	['Mobile Suit Gundam 0083: Stardust Memory'],
	['Mobile Suit Gundam ZZ'],
	['Mobile Suit Victory Gundam'],
	['Mobile Suit Zeta Gundam'],
	['Modern Men'],
	['Modern Family'],
	['The Mod Squad'],
	['The Mole'],
	['Monday Night Football'],
	['Monk'],
	['Monkey'],
	['The Monkees'],
	['Monopoly'],
	['The Monroes (1966)'],
	['The Monroes (1995)'],
	['Monsters'],
	['Monster Allergy'],
	['Monty Python\'s Flying Circus'],
	['Moonlight'],
	['Moonlighting'],
	['Moon Unit'],
	['Mork & Mindy'],
	['Mortal Kombat: Conquest'],
	['MotorSport Ranch'],
	['The Mothers-in-Law'],
	['Mr. Adams and Eve'],
	['Mr. Bean'],
	['Mr. Bean: The Animated Series'],
	['Mr. Belvedere'],
	['Mr. Novak'],
	['Mr. Peepers'],
	['Mr. Personality'],
	['Mr. Meaty'],
	['The Mr. Men Show'],
	['The Mr. Science Show'],
	['Mr Selfridge'],
	['Mr. Show'],
	['Mr. Sunshine'],
	['Mr. Wizard\'s World'],
	['Mr. Young'],
	['Mr. & Mrs. Smith'],
	['MTV Unplugged'],
	['Mujer, Casos de la Vida Real (Mexico)'],
	['The Munsters'],
	['Muktha (Kannada)'],
	['Muppet Babies'],
	['The Muppet Show'],
	['Muppets Tonight'],
	['Murder, She Wrote'],
	['Murphy Brown'],
	['Must Love Kids'],
	['Mutant X'],
	['MXC'],
	['My Babysitter\'s a Vampire'],
	['My Big Fat Greek Life'],
	['My Big Fat Gypsy Wedding'],
	['My Big Fat Obnoxious Boss'],
	['My Big Fat Obnoxious Fiance'],
	['My Boys'],
	['My Brother and Me'],
	['My Family'],
	['My Family\'s Got GUTS'],
	['My Favorite Husband'],
	['My Favorite Martian'],
	['My Friend Flicka'],
	['My Gym Partner\'s a Monkey'],
	['My Kitchen Rules'],
	['My Little Pony'],
	['My Little Pony: Friendship Is Magic'],
	['My Mother the Car'],
	['My Name Is Earl'],
	['My Secret Identity'],
	['My So-Called Life'],
	['My Super Sweet 16'],
	['My Three Sons'],
	['My Two Dads'],
	['My Wife and Kids'],
	['My World and Welcome to It'],
	['Mysterious Ways'],
	['Mystery Diagnosis'],
	['Mystery Science Theater 3000'],
	['MythBusters'],
	['The Naked Brothers Band'],
	['Naked City'],
	['Naked Josh'],
	['The Naked Truth'],
	['The Name of the Game'],
	['Name That Tune'],
	['The Name\'s the Same'],
	['The Nancy Drew Mysteries'],
	['Nancy'],
	['The Nancy Walker Show'],
	['The Nanny'],
	['Nanny and the Professor'],
	['Nanny 911'],
	['Naruto'],
	['National Bingo Night (U.S. game show)'],
	['National Geographic Explorer'],
	['National Vocabulary Championship'],
	['Naturally, Sadie'],
	['The Nature of Things'],
	['Navy Log'],
	['The NBC Mystery Movie'],
	['NCIS'],
	['NCIS: Los Angeles'],
	['Ned and Stacey'],
	['Ned\'s Declassified School Survival Guide'],
	['Ned\'s Newt'],
	['Needles and Pins'],
	['Neighbours'],
	['The New Adventures of He-Man'],
	['The New Adventures of Old Christine'],
	['The New Adventures of Pinocchio'],
	['The New Adventures of Winnie the Pooh'],
	['New Amsterdam'],
	['The New Dick Van Dyke Show'],
	['New Girl'],
	['The New Perry Mason'],
	['The New Show'],
	['New Zoo Revue'],
	['Newhart'],
	['The NewsHour with Jim Lehrer'],
	['NewsRadio'],
	['The Newsroom'],
	['The Newlywed Game'],
	['Next'],
	['Nickelodeon GUTS'],
	['Night Court'],
	['Night Gallery'],
	['Night Heat'],
	['Nightline'],
	['Night Stalker'],
	['Night Stand with Dick Dietrick'],
	['Night Visions'],
	['Nikita'],
	['The Nine Lives of Chloe King'],
	['Ninja Turtles: The Next Mutation'],
	['The Nine'],
	['Nine to Five'],
	['Nineteen Eighty-Four'],
	['Nip/Tuck'],
	['The No.1 Ladies Detective Agency'],
	['Noah and Saskia'],
	['Nobody\'s Watching'],
	['The Norm Show'],
	['North and South'],
	['North Shore'],
	['Northern Exposure'],
	['Not Going Out'],
	['Not the Nine O\'Clock News'],
	['Nothing Sacred'],
	['Noticentro 4'],
	['Now You See It'],
	['Nowhere Man'],
	['Number 96'],
	['Number Please'],
	['Numb3rs'],
	['Nurse Jackie'],
	['The Nurses'],
	['Nurses'],
	['NXT on SyFy'],
	['N.Y.P.D.'],
	['NYPD Blue'],
	['NYC 22'],
	['The O.C.'],
	['O2Be'],
	['The Oblongs'],
	['Ocean Girl'],
	['The Odd Couple'],
	['Odd Job Jack'],
	['Odd Man Out (UK)'],
	['Odd Man Out (US)'],
	['Oddville, MTV'],
	['Odyssey 5'],
	['The Office'],
	['O\'Grady'],
	['Oggy and the Cockroaches'],
	['Ohara'],
	['Óli á Hrauni (Icelandic)'],
	['Oliver Beene'],
	['Omnibus'],
	['On the Rocks'],
	['Once and Again'],
	['Once Upon a Time'],
	['One Day at a Time'],
	['One Foot in the Grave'],
	['One Life to Live'],
	['One Man\'s Family'],
	['One Stroke Painting with Donna Dewberry'],
	['One Tree Hill'],
	['Online Nation'],
	['Only Fools and Horses'],
	['The Only Way Is Essex'],
	['Opposite Sex'],
	['The Oprah Winfrey Show'],
	['The Oregon Trail'],
	['The O\'Reilly Factor'],
	['The Original Amateur Hour'],
	['The Osbournes'],
	['The Others'],
	['Our Friends in the North'],
	['Our House'],
	['Our Miss Brooks'],
	['Outlaw'],
	['Out of Control'],
	['Out of Jimmy\'s Head'],
	['Out of This World'],
	['The Outer Limits (1963)'],
	['The Outer Limits (1995)'],
	['Outer Space Astronauts'],
	['Outsourced'],
	['Over There'],
	['Owen Marshall: Counselor at Law'],
	['Oz'],
	['Ozark Jubilee'],
	['The Pacific (miniseries)'],
	['Pacific Drive (also known as Pacific Beach)'],
	['Pacific Blue'],
	['Packed to the Rafters'],
	['Pac-Man (TV series)'],
	['Page to Screen'],
	['Pair of Kings'],
	['Pan Am'],
	['Panorama'],
	['Pantomime Quiz'],
	['The Paper Chase'],
	['Paper Moon'],
	['Paradise'],
	['The Paradise (2012)'],
	['The Parent Game'],
	['The Parent \'Hood'],
	['Parenthood'],
	['Parker Lewis Can\'t Lose'],
	['Parks and Recreation'],
	['The Partridge Family'],
	['Party Down'],
	['Party of Five'],
	['Passions'],
	['Pass the Buck'],
	['Password'],
	['Password Plus'],
	['The Patty Duke Show'],
	['The Paul Lynde Show'],
	['Paul Sand in Friends and Lovers'],
	['The Pauly D Project'],
	['Pee-wee\'s Playhouse'],
	['The Penguins of Madagascar'],
	['Pensacola: Wings of Gold'],
	['People Are Funny'],
	['People Like Us'],
	['The People\'s Court'],
	['Pepper Dennis'],
	['Perfect Couples'],
	['Perfect Hair Forever'],
	['Perfect Strangers'],
	['The Perry Como Show'],
	['Perry Mason'],
	['Person to Person'],
	['Person of Interest'],
	['Persons Unknown'],
	['The Persuaders!'],
	['Perversions of Science'],
	['Pet Alien'],
	['Peter Gunn'],
	['Petrocelli'],
	['Petticoat Junction'],
	['Peyton Place'],
	['The Phil Donahue Show'],
	['Philly'],
	['Phil of the Future'],
	['The Phil Silvers Show'],
	['Phyllis'],
	['Phineas and Ferb'],
	['Phoenix'],
	['Picket Fences'],
	['Pigeon Boy'],
	['Pinky and the Brain'],
	['Pinwheel (TV series)'],
	['Pirate Master'],
	['The Pirates of Dark Water'],
	['The Pitts'],
	['The PJs'],
	['Planet Sheen'],
	['Playhouse 90'],
	['Playing It Straight'],
	['PlayMania'],
	['Play School (Australian)'],
	['Play School (New Zealand)'],
	['Play School (UK)'],
	['Play the Percentages'],
	['Play Your Hunch'],
	['Please Don\'t Eat the Daisies'],
	['Please, Sir'],
	['Plonsters'],
	['Pocoyo'],
	['Pokémon'],
	['Poker Royale'],
	['Point Pleasant'],
	['Pole Position (TV series)'],
	['Police Academy'],
	['Police Academy: The Series'],
	['Police Squad!'],
	['Police Story'],
	['Police Ten 7'],
	['Police Woman'],
	['Police Women of Broward County'],
	['Police Women of Maricopa County'],
	['Police Women of Memphis'],
	['Police Women of Cincinnati'],
	['Politically Incorrect'],
	['Pop! Goes the Country'],
	['Popstars'],
	['Popular'],
	['Pop-up Video'],
	['Pororo the Little Penguin'],
	['Potatoes and Dragons'],
	['Power of 10'],
	['The Powerpuff Girls'],
	['Power Rangers Dino Thunder'],
	['Power Rangers Jungle Fury'],
	['Power Rangers Lightspeed Rescue'],
	['Power Rangers Lost Galaxy'],
	['Power Rangers Mystic Force'],
	['Power Rangers Ninja Storm'],
	['Power Rangers Operation Overdrive'],
	['Power Rangers in Space'],
	['Power Rangers S.P.D.'],
	['Power Rangers Time Force'],
	['Power Rangers Turbo'],
	['Power Rangers Wild Force'],
	['Power Rangers Zeo'],
	['PM Magazine'],
	['The Practice'],
	['Prank Patrol (Australia)'],
	['Prank Patrol (Canada)'],
	['Prank Patrol (UK)'],
	['Praise The Lord'],
	['Press Your Luck'],
	['The Pretender'],
	['Pretty Little Liars'],
	['Pretty Wild'],
	['The Price Is Right'],
	['Primeval'],
	['Primetime Live'],
	['Prison Break'],
	['Prisoner'],
	['The Prisoner'],
	['Prisoners of Gravity'],
	['Private Practice'],
	['Profiler'],
	['Project G.e.e.K.e.R.'],
	['Project Runway'],
	['Project U.F.O.'],
	['Protagonistas De La Musica'],
	['The Protectors (UK)'],
	['The Proud Family'],
	['Psi Factor'],
	['Psych'],
	['The Psychiatrist'],
	['Puberty Blues'],
	['Punk\'d'],
	['Punky Brewster'],
	['A Pup Named Scooby-Doo'],
	['Pushing Daisies'],
	['Pussycat Dolls Present'],
	['PythagoraSwitch'],
	['Q & A (US)'],
	['Q.E.D. (UK)'],
	['Q.E.D. (US)'],
	['QI'],
	['Quadratics'],
	['Quantum Leap'],
	['Quark'],
	['Quatermass'],
	['The Quatermass Experiment'],
	['Que Locura (Venezuela)'],
	['Queen for a Day'],
	['Queenie\'s Castle'],
	['Queen of Swords'],
	['Queer as Folk (UK)'],
	['Queer as Folk (US)'],
	['Queer Duck'],
	['Queer Eye for the Straight Guy'],
	['A Question Of Sport'],
	['Quick Before They Catch Us'],
	['Quill Awards'],
	['Quiller'],
	['Quincy, M.E.'],
	['Quintuplets'],
	['Quiz Kids Challenge'],
	['Quiznation (UK)'],
	['Quiznation (US)'],
	['Rachael Ray'],
	['Radio Free Roscoe'],
	['Raising Hope'],
	['Raising the Bar'],
	['Ramadaan @ 4'],
	['Ramar of the Jungle'],
	['Randall and Hopkirk (Deceased) (1969)'],
	['Randall & Hopkirk (Deceased) (2000)'],
	['The Rat Patrol'],
	['Rawhide'],
	['Reading Rainbow'],
	['The Real Adventures of Jonny Quest'],
	['Real Chance of Love'],
	['The Real Ghostbusters'],
	['The Real Housewives of Atlanta'],
	['The Real Housewives of Beverly Hills'],
	['The Real Housewives of D.C.'],
	['The Real Housewives of New York City'],
	['The Real Housewives of Orange County'],
	['The Real L Word'],
	['Reality Racing'],
	['Real People'],
	['Real Time with Bill Maher'],
	['The Real World'],
	['Real World/Road Rules Challenge'],
	['Really Me!'],
	['Reaper'],
	['Reba'],
	['The Rebel'],
	['The Rebel Billionaire: Branson\'s Quest for the Best'],
	['Rebelde Way'],
	['ReBoot'],
	['Reborn!'],
	['Recess'],
	['Red Dwarf'],
	['Red Eye w/Greg Gutfeld'],
	['The Red Skelton Show'],
	['Regular Show'],
	['Relic Hunter'],
	['Remington Steele'],
	['Remix TV'],
	['Remote Control'],
	['Ren & Stimpy "Adult Party Cartoon"'],
	['The Ren & Stimpy Show'],
	['Reno 911!'],
	['Rentaghost'],
	['The Replacements'],
	['Rescue 8'],
	['Rescue Me (US)'],
	['Rescue Me (UK)'],
	['Rescue 911'],
	['The Restaurant (Ireland)'],
	['The Restaurant (UK)'],
	['The Restaurant (US)'],
	['The Restless Years'],
	['The Return of Jezebel James'],
	['Return to Peyton Place'],
	['Reunion'],
	['Rev.'],
	['Revenge'],
	['Revolution'],
	['Rhoda'],
	['Rich Man, Poor Man'],
	['Rich Man, Poor Man Book II'],
	['Richard Diamond, Private Detective'],
	['The Riches'],
	['Richie Rich (1980)'],
	['Richie Rich (1996)'],
	['The Rich List'],
	['Rick Mercer Report'],
	['Ridiculousness'],
	['The Rifleman'],
	['Ringer'],
	['Rin Tin Tin K-9 Cop'],
	['Ripper Street'],
	['Ripping Yarns'],
	['Riptide'],
	['Rizzoli & Isles'],
	['Road to Avonlea'],
	['Roadtrip Nation'],
	['The Roaring Twenties'],
	['Rob Dyrdek\'s Fantasy Factory'],
	['Robert Montgomery Presents'],
	['Robin Hood (2006)'],
	['Robin\'s Nest'],
	['Robot Chicken'],
	['Robotboy'],
	['Rock & Roll Jeopardy!'],
	['Rocket Power'],
	['Rocket Robin Hood'],
	['The Rockford Files'],
	['Rocko\'s Modern Life'],
	['Rock of Love with Bret Michaels'],
	['The Rocky and Bullwinkle Show'],
	['Rocky King detective'],
	['Roger Ramjet'],
	['Roll Out'],
	['Rome'],
	['The Rookies'],
	['Room 222'],
	['Roots'],
	['Roots: The Next Generations'],
	['Ros na Rún'],
	['Roseanne'],
	['Roswell'],
	['Route 66'],
	['Rowan & Martin\'s Laugh-In'],
	['Roy'],
	['The Roy Rogers Show'],
	['Royal Canadian Air Farce'],
	['Royal Pains'],
	['Royle Family'],
	['Rubik the Amazing Cube'],
	['Rugby Special'],
	['Run for Your Life'],
	['Run Joe Run'],
	['Runaway (UK)'],
	['Runaway (US)'],
	['Running Wilde'],
	['Rugrats'],
	['Rurouni Kenshin (Japan)'],
	['Rush[disambiguation needed]'],
	['Russian Roulette'],
	['Ryan (Australia)'],
	['Ryan\'s Hope'],
	['Sábado Gigante'],
	['Sabado Sensacional'],
	['Sabrina, the Animated Series'],
	['The Sabrina the Teenage Witch Show'],
	['Sabrina, the Teenage Witch'],
	['The Saddle Club'],
	['Sadie J'],
	['Sailor Moon'],
	['The Saint'],
	['Sale of the Century'],
	['Sally'],
	['Sally'],
	['Salute Your Shorts'],
	['Sam (1973)'],
	['Sam[disambiguation needed] (1978)'],
	['Samantha Who?'],
	['The Samurai (Japan)'],
	['Samurai Champloo'],
	['Samurai Girl'],
	['Samurai Jack'],
	['Sancharam'],
	['Sanctuary'],
	['The Sandy Duncan Show'],
	['Sanford and Son'],
	['Sapphire & Steel'],
	['Satisfaction'],
	['Saturday Night Live'],
	['Savannah'],
	['Saved by the Bell'],
	['Saved by the Bell: The College Years'],
	['Saved by the Bell: The New Class'],
	['Saving Grace'],
	['Scarecrow and Mrs. King'],
	['Scare Tactics'],
	['Scaredy Squirrel'],
	['Schlitz Playhouse of Stars'],
	['Schoolhouse Rock!'],
	['Science Fiction Theatre'],
	['Scooby-Doo, Where Are You! (1969–1972)'],
	['The Scooby Doo Show'],
	['Scoop and Doozie'],
	['Scotland Today'],
	['The Scott and Gary Show'],
	['Scrabble'],
	['Scrubs'],
	['Sea Hunt'],
	['Sealab 2020'],
	['Sealab 2021'],
	['seaQuest DSV'],
	['Search'],
	['Search for Tomorrow'],
	['Second City Television (SCTV)'],
	['Second Verdict (UK)'],
	['Secret Agent'],
	['Secret Diary of a Call Girl'],
	['The Secret Life of the American Teenager'],
	['The Secret Service (UK)'],
	['Secrets of the Cryptkeeper\'s Haunted House'],
	['The Secrets of Isis'],
	['The Secret World of Alex Mack'],
	['Seeing Things'],
	['See It Now'],
	['Seinfeld'],
	['The Sentimental Agent'],
	['The Sentinel'],
	['Sergeant Preston of the Yukon'],
	['Sesame Street'],
	['Set for Life'],
	['Sex and the City'],
	['Sha Na Na'],
	['Shake It Up'],
	['Shameless'],
	['Shark'],
	['Shazam!'],
	['She-Ra: Princess of Power'],
	['She\'s the Sheriff'],
	['Sherlock'],
	['The Shield'],
	['Shindig!'],
	['Shoot For the Stars'],
	['Shop \'Til You Drop'],
	['Shower of Stars'],
	['Show Me the Money (US)'],
	['Sidewalks Entertainment'],
	['Sidewalks: Video Nite'],
	['Sierra'],
	['The Silent Years'],
	['Silk Stalkings'],
	['Silver Spoons'],
	['Simon & Simon'],
	['The Simple Life'],
	['The Simpsons'],
	['Sing Along with Mitch'],
	['Sir Francis Drake'],
	['Sister Kate'],
	['Sister, Sister'],
	['Sisters'],
	['Sit Down, Shut Up'],
	['Six Degrees'],
	['Six Feet Under'],
	['The Six Million Dollar Man'],
	['The Six Wives of Henry VIII'],
	['Skins (UK)'],
	['Skins (US)'],
	['Sky King'],
	['Skippy the Bush Kangaroo (Australia)'],
	['Sleeper Cell'],
	['SLiDE'],
	['Sliders'],
	['Slings and Arrows'],
	['Smack the Pony'],
	['Small Fry Club'],
	['Small Wonder'],
	['Smallville'],
	['Smart Guy'],
	['Smash'],
	['Smith'],
	['The Smothers Brothers Comedy Hour'],
	['The Smurfs'],
	['Snooki & JWoww'],
	['So Little Time'],
	['So Random'],
	['So Weird'],
	['Soap'],
	['Sofia the First'],
	['Something Is Out There'],
	['Something So Right'],
	['Son of the Bride'],
	['Sonny with a Chance'],
	['The Sonny & Cher Comedy Hour'],
	['Sons and Daughters'],
	['Sons of Anarchy'],
	['Sooty and Sweep'],
	['The Sopranos'],
	['The Soup'],
	['Southland'],
	['South of Nowhere'],
	['So You Think You Can Dance (US)'],
	['Space: 1999'],
	['Space: Above and Beyond'],
	['Space Academy'],
	['Space Angel'],
	['Space Cases'],
	['Space Patrol (1950)'],
	['Space Patrol (1962)'],
	['Space Rangers'],
	['Spaced'],
	['Spaceghost'],
	['Spartakus and the Sun Beneath the Sea'],
	['The Spectacular Spider-Man'],
	['Speed Racer'],
	['Spellbinder'],
	['Spellbinder: Land of the Dragon Lord'],
	['Spenser: For Hire'],
	['Special Agent Oso'],
	['Spider-Man (1967)'],
	['Spider-Man (1981)'],
	['Spider-Man (1994)'],
	['Spider-Man: The New Animated Series'],
	['Spin City'],
	['Splatalot! (Australia)'],
	['Splatalot! (Canada)'],
	['Splatalot! (United States)'],
	['Splatalot! (United Kingdom)'],
	['SpongeBob SquarePants'],
	['Spooks'],
	['SportsCenter'],
	['Sports Night'],
	['Sports Tonight'],
	['Spy'],
	['Spy Game'],
	['Spyforce (Australia)'],
	['Square One Television'],
	['Square Pegs'],
	['Squirrel Boy'],
	['St. Elsewhere'],
	['Standoff'],
	['Starblazers'],
	['Starface'],
	['Stargate Atlantis'],
	['Stargate Infinity'],
	['Stargate SG-1'],
	['Stargate Universe'],
	['Stark Raving Mad'],
	['Starman'],
	['Star Search'],
	['Starsky and Hutch'],
	['Starstuff'],
	['Star Trek: The Animated Series'],
	['Star Trek: Phase II'],
	['Star Wars: Clone Wars'],
	['Star Wars: The Clone Wars (2008)'],
	['Star Wars: Droids'],
	['Star Wars: Ewoks'],
	['The State'],
	['State of Grace'],
	['Stella'],
	['Step by Step'],
	['Steptoe and Son'],
	['The Steve Allen Show'],
	['The Steve Wilkos Show'],
	['Storefront Lawyers'],
	['Still Standing'],
	['Stingray (UK)'],
	['Strange Days at Blake Holsey High (aka "Black Hole High")'],
	['Strange Report'],
	['Strangers with Candy'],
	['Street Legal (Canada)'],
	['Street Legal (New Zealand)'],
	['Street Smarts'],
	['The Streets of San Francisco'],
	['Stressed Eric'],
	['Strike It Rich (1950)'],
	['Strike It Rich (1986)'],
	['Strike Force'],
	['Strömsö'],
	['Studio One'],
	['Studio 7'],
	['Studio 60 on the Sunset Strip'],
	['Suburgatory'],
	['Suddenly Susan'],
	['Sugarfoot'],
	['The Suite Life on Deck'],
	['The Suite Life of Zack & Cody'],
	['Suits (TV series)'],
	['Sukeban Deka'],
	['Summer Heights High'],
	['Summerland'],
	['The Sunday Comics'],
	['The Super'],
	['Super Dave'],
	['Super Friends'],
	['Super Gran'],
	['Super Greed'],
	['Super Jeopardy!'],
	['The Super Mario Bros. Super Show!'],
	['Super Mario World'],
	['Super Password'],
	['Super President'],
	['Supercar (UK)'],
	['Superboy'],
	['Supermarket Sweep'],
	['Supernanny'],
	['Supertrain'],
	['Surfside Six'],
	['The Surreal Life'],
	['Survivor'],
	['Survivors (1975)'],
	['Survivors (2008)'],
	['Swamp Thing'],
	['The Swan'],
	['Swans Crossing'],
	['S.W.A.T.'],
	['SWAT Kats: The Radical Squadron'],
	['Sweet and Sour'],
	['Swingtown'],
	['Switch (1975) (US)'],
	['Switch (2012) (UK)'],
	['Switched at Birth'],
	['The Swiss Family Robinson (US)'],
	['The Sword in the Stone'],
	['Sword of Freedom'],
	['Tak and the Power of Juju'],
	['Takeshi\'s Castle (Japan)'],
	['Tagesschau (Germany)'],
	['Taggart (Scotland)'],
	['Taken (TV miniseries)'],
	['Take the High Road'],
	['Takin\' Over the Asylum'],
	['Talent Varieties'],
	['TaleSpin'],
	['Tales from the Crypt'],
	['Tales from the Cryptkeeper'],
	['Tales from the Darkside'],
	['Tales From Fat Tulip\'s Garden'],
	['Tales of the Unexpected'],
	['Tales of Wells Fargo'],
	['Tallship Chronicles'],
	['The Tarzan/Lone Ranger Adventure Hour'],
	['Tarzan, Lord of the Jungle'],
	['Tarzan and the Super 7'],
	['Tattletales'],
	['Taxi'],
	['Team Umizoomi'],
	['The Ted Knight Show (1978)'],
	['The Ted Knight Show (1986)'],
	['Teenage Mutant Ninja Turtles (1987)'],
	['Teenage Mutant Ninja Turtles (2003)'],
	['Teenage Mutant Ninja Turtles (2012)'],
	['Teen Mom'],
	['Teen Mom 2'],
	['Teen Titans'],
	['Teen Wolf'],
	['Teletubbies'],
	['Temperatures Rising'],
	['Temptation Island'],
	['Tennessee Tuxedo'],
	['Terminator: The Sarah Connor Chronicles'],
	['Terra Nova'],
	['Texaco Star Theater'],
	['Texas Country Reporter'],
	['Texas Justice'],
	['The Texas Wheelers'],
	['Thank Your Lucky Stars'],
	['That \'70s Show'],
	['That \'80s Show'],
	['That Girl'],
	['That\'s Incredible!'],
	['That\'s Life (1968)'],
	['That\'s Life (1998)'],
	['That\'s Life (2000)'],
	['That\'s My Boy (U.S.)'],
	['That\'s My Boy (U.K.)'],
	['That\'s My Bush!'],
	['That\'s My Dog'],
	['That\'s My Mama'],
	['That\'s So Raven'],
	['That\'s the Question'],
	['That Was The Week That Was'],
	['The Dirty South'],
	['The Finder'],
	['The Friday Sermon'],
	['The Faizal Sayed TV Talk Show'],
	['Then Came Bronson'],
	['They Came from Outer Space'],
	['Thicker than Water'],
	['Thierry La Fronde'],
	['Third Watch'],
	['Thirtysomething'],
	['This Hour Has 22 Minutes'],
	['This Is Your Day'],
	['This Is Your Life'],
	['This Old House'],
	['Three Rivers'],
	['Three\'s a Crowd (sitcom)'],
	['Three\'s a Crowd (game show)'],
	['Three\'s Company'],
	['Threshold'],
	['Thriller (UK)'],
	['Thriller (US)'],
	['Thundarr The Barbarian'],
	['Thunderbirds'],
	['Thunderbirds 2086 (Japan)'],
	['Thundercats'],
	['Tic-Tac-Dough'],
	['The Tick'],
	['Tia & Tamera'],
	['Till Death Us Do Part'],
	['\'Til Death'],
	['The Tim Conway Comedy Hour'],
	['Tim and Eric Nite Live!'],
	['Timecop'],
	['Timeslip'],
	['Time Signs'],
	['Time Team'],
	['Time Trax'],
	['The Time Tunnel'],
	['Time Was'],
	['Timothy Goes To School'],
	['Tiny Toon Adventures'],
	['Tiswas'],
	['Tittybangbang'],
	['Titus'],
	['T. J. Hooker'],
	['Today Show'],
	['Today on the Farm'],
	['Today\'s Special'],
	['Toddlers & Tiaras'],
	['The Tofus'],
	['Tokusou Sentai Dekaranger'],
	['Toma'],
	['Tom and Jerry'],
	['Tom Corbett, Space Cadet'],
	['The Tomorrow People'],
	['The Tomorrow Show'],
	['The Tonight Show Starring Johnny Carson'],
	['The Tonight Show with Conan O\'Brien'],
	['The Tonight Show with Jay Leno'],
	['The Tony Danza Show'],
	['Tool Academy'],
	['Top Cat'],
	['Top Chef'],
	['Top Design'],
	['Top Gear (1977)'],
	['Top Gear (2002)'],
	['Top Of The Pops'],
	['Torchwood'],
	['Torchy the Battery Boy (UK)'],
	['To Rome With Love'],
	['The Tortellis'],
	['Tosh.0'],
	['Total Drama Action'],
	['Total Drama Island'],
	['Total Drama: Revenge of the Island'],
	['Total Drama World Tour'],
	['Totally Spies'],
	['Total Nonstop Action Wrestling'],
	['Total Request Live*Total Wipeout'],
	['To Tell the Truth'],
	['Touch'],
	['A Touch of Frost'],
	['Touched by an Angel'],
	['Touching Evil'],
	['Tough Crowd with Colin Quinn'],
	['Tour of Duty'],
	['Tower Prep'],
	['The Tracey Ullman Show'],
	['Trading Spaces'],
	['Trailer Park Boys'],
	['Transformers'],
	['Transformers: Animated'],
	['Transformers: Armada'],
	['Transformers - Beast Machines'],
	['Transformers: Beast Wars'],
	['Transformers: Cybertron'],
	['Transformers: Energon'],
	['Transformers: Robots in Disguise'],
	['Tranzor Z'],
	['Trapper John, M.D.'],
	['Trauma'],
	['The Troop'],
	['Treasure Hunt'],
	['Treme'],
	['Trigun'],
	['Trinity Blood'],
	['Trivia Track'],
	['Trivia Trap'],
	['Tru Calling'],
	['TruTV Presents: World\'s Dumbest...'],
	['True Blood'],
	['True Jackson: VP'],
	['Truth or Consequences'],
	['The Tudors'],
	['T.U.F.F. Puppy'],
	['Turkey Television'],
	['Turn A Gundam'],
	['Turnabout'],
	['Turn-On'],
	['Twelve O\'Clock High'],
	['Twenty One'],
	['Twenty Questions'],
	['Twice in a Lifetime'],
	['The Twilight Zone'],
	['Twin Peaks'],
	['Two and a Half Men'],
	['Two for the Money'],
	['Two Guys and a Girl'],
	['Two of a Kind (UK)'],
	['Two of a Kind (US)'],
	['Two Pints of Lager and a Packet of Crisps'],
	['TV Funhouse'],
	['TV\'s Bloopers & Practical Jokes'],
	['Tyler Perry\'s House of Payne'],
	['Ugly Betty'],
	['Ultimate Force'],
	['Ulysses 31'],
	['Uncle Max'],
	['Undercover Boss'],
	['Underdog'],
	['Undergrads'],
	['Under the Dome'],
	['Unfabulous'],
	['The Unit'],
	['United States of Tara'],
	['Unnatural History'],
	['Until Tomorrow'],
	['Upstairs, Downstairs (1971)'],
	['Upstairs, Downstairs (2010)'],
	['The Vacant Lot'],
	['Vampire Diaries'],
	['Veep'],
	['Vegas (1978)'],
	['The Venture Bros.'],
	['Veronica Mars'],
	['Veronica\'s Closet'],
	['Vicar of Dibley'],
	['Victorious'],
	['Viper'],
	['The Virginian'],
	['V (1983 miniseries)'],
	['V: The Final Battle (1984 miniseries)'],
	['V (1984)'],
	['V (2009)'],
	['Voltron: Defender of the Universe'],
	['VR.5'],
	['Wagon Train'],
	['Wait Till Your Father Gets Home'],
	['Walker, Texas Ranger'],
	['The Walking Dead'],
	['The Walter Winchell Show'],
	['The Waltons'],
	['Wanted: Dead or Alive'],
	['The War at Home'],
	['War Planets'],
	['Warship'],
	['Watching Ellie'],
	['Watch Mr. Wizard'],
	['Waterloo Road'],
	['The Way of the Master'],
	['The Wayans Bros.'],
	['Wayside'],
	['We Are the Champions (UK)'],
	['The Weakest Link'],
	['The Web'],
	['Webster'],
	['Weird Science'],
	['Welcome Back, Kotter'],
	['Welcome to Pooh Corner'],
	['West 57th'],
	['West Point Story'],
	['The West Wing'],
	['Whammy! The All-New Press Your Luck'],
	['What About Brian'],
	['Whatever Happened to Robot Jones?'],
	['What I Like About You'],
	['What\'s Happening!!'],
	['What\'s My Line?'],
	['What\'s New Scooby Doo?'],
	['What the Papers Say'],
	['What\'s the Story?'],
	['Wheel of Fortune'],
	['Wheel of Fortune 2000'],
	['When Games Attack'],
	['Where the Heart Is (1969)'],
	['White Collar'],
	['While You Were Out'],
	['Whiplash'],
	['Whirlybirds'],
	['Whistler'],
	['The White Shadow'],
	['The Whitest Kids U\' Know'],
	['Who Dares Wins'],
	['Who\'s the Boss?'],
	['Who Wants to Be a Millionaire?'],
	['Who Wants to Be a Superhero?'],
	['Who Wants to Be a Super Millionaire'],
	['Who Wants to Marry a Multi-Millionaire?'],
	['Who Wants to Marry My Dad?'],
	['Whose Line Is It Anyway?'],
	['Wife Swap'],
	['Wildboyz'],
	['Wildfire'],
	['Wild Kingdom'],
	['Wild On!'],
	['The Wild Thornberrys'],
	['The Wild Wild West'],
	['Will & Grace'],
	['Win Ben Stein\'s Money'],
	['Wingin\' It'],
	['Wings (NBC)'],
	['Wings (BBC)'],
	['Win, Lose or Draw'],
	['Wine Portfolio'],
	['Winner Take All'],
	['Winning Streak'],
	['WinTuition'],
	['Winx Club'],
	['The Wire'],
	['Wire in the Blood'],
	['Wiseguy'],
	['With This Ring'],
	['Without a Trace'],
	['Without Prejudice?'],
	['Wizards and Warriors'],
	['The Wizard of Oz'],
	['The Wizard'],
	['Wizards of Waverly Place'],
	['WKRP in Cincinnati'],
	['Wok with Yan'],
	['Wolverine'],
	['Wolverine and the X-Men'],
	['The Wombles (1973) (UK)'],
	['The Wombles (1996) (UK)'],
	['Women\'s Murder Club'],
	['Wonderfalls'],
	['Wonder Showzen'],
	['The Wonderful World of Disney'],
	['Wonder Woman'],
	['The Wonder Years'],
	['The Woodlanders'],
	['WordGirl'],
	['Workaholics'],
	['Working'],
	['Working Girl'],
	['World of Quest'],
	['Work Out'],
	['World Blackjack Tour'],
	['World Series of Blackjack'],
	['World\'s Dumbest Criminals'],
	['World\'s Most Amazing Videos'],
	['World\'s Wildest Police Videos'],
	['Wow! Wow! Wubbzy!'],
	['WWE Friday Night SmackDown'],
	['WWE Raw'],
	['WWE Superstars'],
	['The X-Files'],
	['Xena: Warrior Princess'],
	['The X Factor (Australia)'],
	['The X Factor (UK)'],
	['The X Factor (US)'],
	['X-Men (1992)'],
	['X-Men (2011)'],
	['X-Men: Evolution'],
	['X-Play'],
	['Xiaolin Showdown'],
	['Xuxa'],
	['The Xtra Factor (UK)'],
	['xxxHolic'],
	['Yancy Derringer'],
	['The Yellow Rose'],
	['Yes, Dear'],
	['Yes Minister'],
	['Yes, Prime Minister'],
	['Yin Yang Yo!'],
	['Yo Gabba Gabba!'],
	['Yo Se Que Mentia (Puerto Rico)'],
	['Yo Yogi'],
	['Yogi Bear'],
	['Yogi\'s Gang'],
	['You Are There'],
	['You Asked For It'],
	['You Bet Your Life'],
	['You Can\'t Do That on Television'],
	['You\'ve Been Framed'],
	['The Young and the Restless'],
	['Young Blades'],
	['The Young Doctors'],
	['Young Dracula'],
	['The Young Indiana Jones Chronicles'],
	['The Young Ones'],
	['The Young Riders'],
	['Young Robin Hood'],
	['Young Talent Time'],
	['Your Hit Parade'],
	['Your Show of Shows'],
	['Yu-Gi-Oh! (1998)'],
	['Yu-Gi-Oh! (2000)'],
	['Yu-Gi-Oh! GX'],
	['Yu-Gi-Oh! 5D\'s'],
	['Yu-Gi-Oh! Zexal'],
	['Zatch Bell!'],
	['Z-Cars'],
	['Zig and Sharko'],
	['Zeke and Luther'],
	['Zoe, Duncan, Jack and Jane (a.k.a. Zoe)'],
	['Zoey 101'],
	['Zoo Diaries'],
	['Zoobilee Zoo'],
	['Zooboomafoo'],
	['The Zoo Gang(Australia)'],
	['ZOOM (1972)'],
	['ZOOM (1999)'],
	['Zorro (1957)'],
	['The New Adventures of Zorro (1981)'],
	['The New Adventures of Zorro (1997)'],
	['Zorro and Son (1983, live action)'],
	['Zorro (1990)'],
	['Kaiketsu Zorro (1996)'],
	['Zorro: La Espada y la Rosa (2007)'],
	['Zorro: Generation Z (2008)'],
	['Zorro (Philippines)'],
	['Zumbo (Australia) (SBS 2011)'],
	['Zoids']
]

splashes = [
		
			'     _/\/\/\/\/\/\__/\/\____/\/\_\n'
			'    _____/\/\______/\/\____/\/\_ \n'
			'   _____/\/\______/\/\____/\/\_  \n'
			'  _____/\/\________/\/\/\/\___   \n'
			' _____/\/\__________/\/\_____    \n'
			'____________________________     \n'
,
			'_/\/\/\/\/\/\__/\/\____/\/\_\n'
			'_____/\/\______/\/\____/\/\_\n'
			'_____/\/\______/\/\____/\/\_\n'
			'_____/\/\________/\/\/\/\___\n'
			'_____/\/\__________/\/\_____\n'
			'____________________________\n'
,
			'_/_/_/_/_/  _/      _/   \n'
			'   _/      _/      _/    \n'
			'  _/      _/      _/     \n'
			' _/        _/  _/        \n'
			'_/          _/           \n'
,
			' ______  __  __    \n'
			'/\__  _\/\ \/\ \   \n'
			'\/_/\ \/\ \ \ \ \  \n'
			'   \ \ \ \ \ \ \ \ \n'
			'    \ \ \ \ \ \_/ \ \n'
			'     \ \_\ \ `\___/\n'
			'      \/_/  `\/__/ \n'
,
			'      __        _         \n'
			'     (  ~-_ /\' \' )       )\n'
			'          /`-__)/      _/ \n'
			'        /\'     /    _/~   \n'
			'      /\'      /  _/~      \n'
			'    /\'       /_/~         \n'
			'(,/(_,      /~            \n'
                          
,
			'/\\\ /\\\\\\/\\         /\\ \n'
			'     /\\     /\\       /\\  \n'
			'     /\\      /\\     /\\   \n'
			'     /\\       /\\   /\\    \n'
			'     /\\        /\\ /\\     \n'
			'     /\\         /\\\\      \n'
			'     /\\          /\\       \n'
,
			' _|_|_|_|_|  _|      _|   \n'
			'     _|      _|      _|   \n'
			'     _|      _|      _|   \n'
			'     _|        _|  _|     \n'
			'     _|          _|       \n'
,       
			'__/\\\\\\\\\\\\\\\__/\\\________/\\\_         \n'
			' _\///////\\\/////__\/\\\_______\/\\\_        \n'
			'  _______\/\\\_______\//\\\______/\\\__       \n'
			'   _______\/\\\________\//\\\____/\\\___      \n'
			'    _______\/\\\_________\//\\\__/\\\____     \n'
			'     _______\/\\\__________\//\\\/\\\_____    \n'
			'      _______\/\\\___________\//\\\\\______   \n'
			'       _______\/\\\____________\//\\\_______  \n'
			'        _______\///______________\///________ \n'
]                                                 

def getTime():
	return(time.mktime(time.gmtime()))

def animSubtitle():
	#print(WARNING + "\t❰安全清洁❱")
	print(WARNING)
	print("")
	bars = ["❱"," "]
	for b in bars:
		bar = b
		for i in range(0,15):
			sys.stdout.write("\r" + bar)
			sleep(0.02)
			sys.stdout.flush()
			bar = bar + b
		sys.stdout.flush()
	frames = ["\t  █          ","\t  ͟          ","\t  █          ","\t  ͟          ","\t  █          ","\t  ͟          ","\t  █          ","\t  ͟          ","\t  █          ","\t  ͟          ","\t  ❰❱          ","\t ❰  ❱          ","\t❰    ❱          ","\t❰  清 ❱          ","\t❰安 清 ❱          ","\t❰安 清洁❱          ","\t❰安全清洁❱   "]
	for f in frames:
		sys.stdout.write("\r" + f)
		sleep(0.1)
		sys.stdout.flush()
	print("")

def waitBar():
	## ░ ▒ ▓ █
	print("")
	bars = ["░","▒","▓","█"]
	for b in bars:
		bar = b
		for i in range(0,27):
			sys.stdout.write("\r" + bar)
			sleep(decimal.Decimal(ran(1,200))/1000)
			sys.stdout.flush()
			bar = bar + b
		sys.stdout.flush()
	print("")

def calcBar():
	print("")
	for c in range(0,7):
		letters = "Calculating..."
		bars = ["░"]
		for b in bars:
			bar = b
			for i in range(0,len(letters)):
				sys.stdout.write("\r" + bar)
				sleep(decimal.Decimal(0.02))
				sys.stdout.flush()
				bar = bar + b
		sys.stdout.flush()
		sys.stdout.write("\r")
		for l in letters:
			letters = l
			for i in range(0,len(letters)):
				sys.stdout.write(letters)
				sleep(decimal.Decimal(0.02))
				sys.stdout.flush()
				letters = letters + l	
		sys.stdout.flush()
	sys.stdout.write("\rDone...              ")
	print("")

def countDown(seconds):###############################################################################################################
	print(HEADER + "")
	startTime = getTime()
	charSpeed = 0.001
	secondsLeft = seconds + 1
	for c in range(1,int(seconds * 1) + 1):
		timeStart = getTime()
		secondsLeft -= 1
		letters = "Starting again in "+str(secondsLeft)+" seconds..."
		delTime = 1 - ((len(letters) * charSpeed) * 2)
		bars = ["░"]
		for b in bars:
			bar = b
			for i in range(0,len(letters)):
				sys.stdout.write("\r" + bar)
				sleep(decimal.Decimal(charSpeed))
				sys.stdout.flush()
				bar = bar + b
		sys.stdout.flush()
		sys.stdout.write("\r")
		for l in letters:
			letters = l
			for i in range(0,len(letters)):
				sys.stdout.write(letters)
				sleep(decimal.Decimal(charSpeed))
				sys.stdout.flush()
				letters = letters + l	
		sys.stdout.flush()
		if timeStart - getTime() == 0:charSpeed += 0.001
		try:sleep(delTime)
		except:pass
	print("")

def cleanString(string):
	remStrings = [" - ","'","(",")"]
	for r in remStrings:
		string = string.replace(r,"")
	repStrings = [["."," "]]
	for r in repStrings:
		string = string.replace(r[0],r[1])
	return (string.strip())

def searchableString(string):
	remStrings = ["'"]
	for r in remStrings:
		string = string.replace(r,"")
	repStrings = [[" ","."]]
	for r in repStrings:
		string = string.replace(r[0],r[1])
	return (string.strip())

def getTitle(filename, accuracy = False, test = "All"):
	if test == "All":
		showTitles = []
		for t in titles:
			showTitles.append(t[0])
	else:
		showTitles = test
	highest = [0,None]
	testing = []
	filename = filename.title()
	filename = filename.replace("."," ")
	filename = filename.title()
	for s in showTitles:
		testing = [difflib.SequenceMatcher(None,s,filename).ratio(),s]
		if testing[0] >= highest[0]:
			highest = testing
	if highest[0] <= sensitivityTitle and not accuracy:
		return(cleanString(filename))
	else:
		if accuracy:
			return([highest[0],highest[1]])
		else:
			return(highest[1])

def getGenre(title):
	for t in titles:
		#print(title +" "+ t[0])
		if title == t[0]:
			if t[1][0] == "" or t[1] == None:return("Unknown")
			else:return(t[1])

def getSeaEpi(filename):
	bad = False
	filename = searchableString(filename)
	for i in range(0,1):
		try:
			if i > 0:filename = eName + filename
			patterns = [
				'(?P<show>[\w\s.,_-]+?)\.[Ss]?(?P<season>[\d]{1,2})[XxEe]?(?P<episode>[\d]{2})',
				'(?P<show>[\w\s.,_-]+?)\.[Ss]?(?P<season>[\d]{1,2})[.][XxEe]?(?P<episode>[\d]{2})',
				'(?P<show>[\w\s.,_-]+?)\.[Ss]eason?(?P<season>[\d]{1,2})[.][Ee]pisode?(?P<episode>[\d]{2})',
				'(?P<show>[\w\s.,_-]+?)\.[Ss]eason.h?(?P<season>[\d]{1,2})[.][Ee]pisode.?(?P<episode>[\d]{2})',
				'(?P<show>[\w\s.,_-]+?)\.[Ss]eason?(?P<season>[\d]{1,2})[Ee]pisode?(?P<episode>[\d]{2})',
				'(?P<show>[\w\s.,_-]+?)\.[\(\[]?(?P<season>[\d]{1,2}).[\]\)]?(?P<episode>[\d]{2})',
				'(?P<show>[\w\s.,_-]+?)\.[Ss]?(?P<season>[\d]{1,2})[XxEe][XxEe]?(?P<episode>[\d]{2})'
				]
			for attempt in patterns:
				p = re.compile(attempt)
				patVal = p.findall(filename)
				if not patVal == []: break
			patVal = patVal[0]
			if patVal[0] == "":
				bad = True
				break
			return(patVal)
			break
		except:bad = True
	if bad: return("BADPATTERN")

def getFileExt(filename):
	s = filename.split(".")
	return(s[len(s) - 1])

def getTimeElapsed():
	reference = "Seconds"
	elapsed = now() - startTime
	if elapsed >= 60:
		reference = "Minute(s)"
		elapsed = elapsed / 60
		if elapsed >= 60:
			reference = "Hour(s)"
			elapsed = elapsed / 60
	return([elapsed,reference])

def quit():
	if animations:calcBar()
	#print(HEADER + "\n...Done")
	print(HEADER)
	print("\tTotal Files Processed:\t\t" + str(totalFiles))
	print("\tTotal Time Processed:\t\t" + str(getTimeElapsed()[0]) + " " + getTimeElapsed()[1])
	print("\tAverage Time Processed:\t\t" + str(getTimeElapsed()[0] / totalFiles) + " " + getTimeElapsed()[1] + " per file")
	print("\tTotal Perfect Folders:\t\t" + str(totalPerfect) +"/"+str(totalFolders))
	print("\tPercent Perfect Folders:\t" + str((totalPerfect * 100) / totalFolders)+"%")
	sleep(5)
	exit()

def getEmergencyName(path):
	folder = path
	possibleNames = []
	ignorePaths = ["/media/NAS/Volume_1/Completed/TV","/media/NAS/Volume_2/Media Drive/Video/TV"]
	for i in ignorePaths:
		folder = folder.replace(i,"")
	folder = folder.split("/")
	for f in folder:
		if not f == "":
			if not getTitle(f, accuracy=True) == f.title():
				if getTitle(f, accuracy=True)[0] >= 0.70:
					#print getTitle(f, accuracy=True)
					possibleNames.append(getTitle(f, accuracy=True))
	if len(possibleNames) < 1:
		return("Unknown")
	else:
		possibleNames.sort(reverse=True)
		return(possibleNames[0][1])

def cleanOld():
	try:
		if not keepOldSystem:
			print(OKGREEN + "Cleaning up old files...")
			shutil.rmtree(tvDest)
	except:pass

def link(source,dest):
	if linkType == "Hard":
		os.link(source,dest)
	elif linkType == "Soft":
		os.symlink(source,dest)
	else:
		exit("No link type set")

def removeEmptyFolders(path):
	if not os.path.isdir(path):return
	files = os.listdir(path)
	if len(files):
		for f in files:
			fullpath = os.path.join(path, f)
			if os.path.isdir(fullpath):removeEmptyFolders(fullpath)
	files = os.listdir(path)
	if len(files) == 0:
		os.rmdir(path)

def recDir(dir):
	print(OKBLUE + "Building recursive: " + FAIL + dir)
	dirArr = []
	dirs = os.walk(dir)
	for ds in dirs:
		for d in ds:
			try:
				if os.path.isdir(d):
					dirArr.append(d)
			except:pass
	return(dirArr)



## MAIN LOOP ##                                                                               ##############################################
running = True
totalFiles = 0
totalFolders = 0
totalPerfect = 0
os.system("clear")
print(FAIL + splashes[ran(0,len(splashes) - 1)])
if animations:
	animSubtitle()
	waitBar()
while running:
	for tvDest in destinations:
		cleanOld()
		if not os.path.isdir(tvDest):os.makedirs(tvDest)
		startTime = now()
		for topLevel in sources:
			for rootSource in recDir(topLevel):
				try:
					shows = []
					messyFiles = os.listdir(rootSource)
					for m in messyFiles:
						if os.path.isfile(rootSource + "/" + m):
							shows.append(m)
					if len(shows) == 0:
						print(HEADER + "\nThe folder " + FAIL + rootSource + HEADER + " is empty.\n")
					else:
						try:
							totalFiles = totalFiles + len(shows)
						except:pass
						eName = getEmergencyName(rootSource)
						perfectRound = True
						print(HEADER + "\n\nProcessing " + str(len(shows)) + " files in '" + FAIL + rootSource + HEADER + "'...\n")
						print(HEADER + "\t\t➤ In case of emergency, using " + OKGREEN + eName + HEADER + " as Title")
						for s in shows:
							print(OKGREEN + "Starting " + OKBLUE + s)
							try:
								seaEpi = getSeaEpi(s)
								if seaEpi == "BADPATTERN":
									perfectRound = False
									print(WARNING + "\t⬑     ✗ Could not recognize Season/Episode pattern!")
									if not os.path.isdir(tvDest + "/Other"):os.makedirs(tvDest + "/Other")
									try:
										safeWord = s.split("-")[0]
										safeWord = safeWord.replace("."," ")
										safeWord = safeWord.split(" ")[:2]
										safeWord_ = ""
										for w in safeWord:
											safeWord_ = safeWord_ + " " + w
										safeWord = safeWord_
										safeWord = safeWord.lstrip()
										#if difflib.SequenceMatcher(None,s,getTitle(safeWord)).ratio() >= 0.7:
										#print getTitle(safeWord, accuracy = True)
										#print getTitle(safeWord, accuracy = True, test = [getTitle(safeWord, accuracy = True)[1]])
										#if not getTitle(safeWord) == safeWord.title():
										if getTitle(safeWord, accuracy = True, test = [getTitle(safeWord, accuracy = True)[1]])[0] >= 0.9:
											#print "'" + getTitle(safeWord) + "' '" + safeWord.title() + "'"
											if not os.path.isdir(tvDest + "/Other/" + getTitle(safeWord)):os.makedirs(tvDest + "/Other/" + getTitle(safeWord))
											link(rootSource + "/" + s,tvDest + "/Other/" + getTitle(safeWord) + "/" + s)
										else:
											#print "Bottom"
											if not os.path.isdir(tvDest + "/Other/" + eName):os.makedirs(tvDest + "/Other/" + eName)
											link(rootSource + "/" + s,tvDest + "/Other/" + eName + "/" + s)
										print(OKGREEN + "\t\t⬑     ✓ Linking " + OKBLUE + s + OKGREEN + " into the '" + OKBLUE + "Other" + OKGREEN + "' folder")
									except:print(FAIL + "\t\t⬑     ✗ Could not create link!")
								else:
									title = getTitle(seaEpi[0])
									season = seaEpi[1]
									season = int(season)
									if season <= 9:season = "0" + str(season)
									season = str(season)
									episode = seaEpi[2]
									episode = int(episode)
									if episode <= 9:episode = "0" + str(episode)
									episode = str(episode)
									extension = getFileExt(s)
									newFileName = title + " - S" + season + "E" + episode + "." + extension
									genreFingerprint = "###GENRE###"
			
									## A101 - This will create the physicall organization
									destFolder = [
											["Flat",tvDest + "/By Name/All/" + title + "/Season " + season],				# Standard Series/Season view
											["Flat",tvDest + "/By Name/Everything in one/"],						# All shows under one view
											["Flat",tvDest + "/By Name/All Episodes/" + title],						# A view that doesn't serperate seasons
											["Flat",tvDest + "/By Name/Custom - Isaac/" + title],						# Isaac's prefered view
											["Flat",tvDest + "/By Name/Alphabetical/" + title[:1] + "/" + title + "/Season " + season],	# Creates alphabetical shows
											["Genre",tvDest + "/By Genre/All/" + genreFingerprint + "/" + title + "/Season " + season],
											["Genre",tvDest + "/By Genre/All in Genre/" + genreFingerprint],
											["Genre",tvDest + "/By Genre/All in Series/" + genreFingerprint + "/" + title]
										]
			
									if extension.lower() == "part":
										print(OKGREEN + "\t⬑     ✗ Skipping partial file " + WARNING + s)
									else:
										print(OKGREEN + "\t⬑     ✓ Linking " + OKBLUE + s + OKGREEN + " as " + OKBLUE + newFileName + "")
										for destStrings in destFolder:
											if destStrings[0] == "Flat":
												d = destStrings[1]
												try:
													if not os.path.isdir(d):os.makedirs(d)
													link(rootSource + "/" + s,d + "/" + newFileName)
												except:print(OKGREEN + "\t\t⬑     ✗ Could not link the file " + WARNING + newFileName)
												if not os.path.isfile(d + "/" + newFileName): print(FAIL + "\t⬑ ✗ Could not find the link " + WARNING + newFileName)
											if destStrings[0] == "Genre":
												for g in getGenre(title):
													d = destStrings[1]
													d = d.replace(genreFingerprint,g)
													d = d.replace(genreFingerprint,"Unknown")
													d = d.replace("//","/Unknown/")
													try:
														if not os.path.isdir(d):os.makedirs(d)
														link(rootSource + "/" + s,d + "/" + newFileName)
													except:print(OKGREEN + "\t\t⬑     ✗ Could not link the file " + WARNING + newFileName)
													if not os.path.isfile(d + "/" + newFileName): print(FAIL + "\t⬑ ✗ Could not find the link " + WARNING + newFileName)

							except:print(FAIL + "\t⬑     ✗ Could not link the file " + WARNING + s)
						if perfectRound and len(shows) != 0:
							print(HEADER + "\t\t➤ Perfect Folder!  - 100% Linking!")
							totalPerfect += 1
						totalFolders += 1
						print(HEADER + "\t\t\t➤ Processed " + str(totalFiles) + " files so far.\n\n\n")
					removeEmptyFolders(tvDest)
				except KeyboardInterrupt:quit()
				except:
					print(FAIL + "Something failed...\t\t\tepicly...\t\tprobably a bad directory...\tgive me a minute...")
					if animations:waitBar()
			if runCont:
				countDown(runFreq)
			else:
				running = False
quit()
